Category Archives: Flash

Flash development in AS3

Red5 0.9.1 and new experiments

So it’s been over a year since this hooligan has posted anything on the blog.  The dh’s have been on bit of a hiatus, but are back in the swing of things.  In the past year, there has been some learnin’ going on and some actual ‘experiments’ beginning.  The biggest is ‘the Sodium Salt experiment’ which will incorporate ‘the Frisbee experiment’ (more details of the frisbee to come).  The plan is to build out a framework based on a real-time system powered by Red5 (working title, dh:RTS) which will be integrated into, the soon to be open sourced, dh:Core (0.1).  The dh:Core is a work-in-progress all around server sided framework designed to work on a LAMP environment supporting RIA apps and eventually mobile (iOS and Android).   It’s built in PHP 5 and based on some existing popular frameworks and methods.

Anyways, I digress, the point of this post is to introduce the new Red5 magic  happening on the dirty hooligans front with the SodiumSalt experiment.  IM (with video capabilities), live webcasts/podcasts, music, movies, politics, sex, drugs and rock ‘n’ roll.  The expected initial release into the wild is by end of year and extended features to follow shortly after.

As things progress I/we will post updates and findings regarding the different adventures.  Most importantly, the plan is to open-source everything as they become stable and ‘clean’ (comments, docs, etc) so stay tuned my nerdtastic comrades.

stay dirty.

Red5 0.8 and the best tutorial to set up a dev environment

Ok, so in searching for the best way to set up a development environment and such; I have found the greatest up-to-date (Red5 0.8) tutorials.  Assuming you have Red5 installed somewhere to deploy or if you just want play around locally on your MacBook Pro, Mac Pro or any Intel based Mac OS X 10.5+, then I have waywardly and deliriously stumbled across the solution: TCP:1935′s Blog found HERE

I’m hoping to follow up some of this fine site’s tutorials with ‘side’ tutorials that will include MySQL usage, AIR, Flex, Flash and other interaction based coding.

Red5 Introduction

Alright, so I’ve been swimming in the deep end trying to learn Red5; because the idea of live streaming and not paying 5k for Flash Media Server is sexy as hell.  So this is a collection of tutorials I will be constructing as I learn and at least semi-conquer each area of Red5.

A few things first since it is really hard to find newer tutorials on Red5 and especially anything with AS3 so I will try to provide both examples with the sample apps in AS2 and then build AS3 versions as well.

My Default Setup:

Local Machine:
Mac OS X (10.5.x)
MySQL 5
PHP 5.2.x
Red5 0.7.0

Remote Server:
Linux CentOS 5.3
MySQL 5
PHP 5.2.x
Red5 0.7.0

Requirements for the sexy beast that is Red5:

NOTE:
If you’re installing this on a server, also download it for you local machine so that you have the sample flash/flex files

Red5 (0.7.0 is what I use for this and will say different if i change it up)
select your appropriate OS build:
http://jira.red5.org/confluence/display/downloads/Home

Prereq’s to know:

Mac users:
If you have Mac OS X 10.5.x you should have all the latest prereq’s you’ll need for java, ant, apache, etc
(You will need to start up Apache by going to: System Preferences > Sharing (under Internet & Network), then make sure ‘Web Sharing‘ is checked (you can check/uncheck to restart Apache at any time).

Linux Servers (CentOS 5.3):
Due to the incredible pain in the ass that this is to install Red5 I came across a bash file that I’ve modified to fit my needs.  I would love to give credit but cannot find the blog this was retrieved from (let me know if you’re the one), however I did have to make several link and handling updates so that it would work for my needs.  See my Installing Red5 on Linux CentOS 5 tutorial for more info.

Windows (XP):
I just installed it and it worked so I don’t have any detailed info on this yet (I do have WAMP download running).

Now once Red5 is installed lets get into some of the sample apps so that you can it connected.

The location of the sample files are as follows:

Mac:
/Applications/red5/swf/samples

Linux:
/usr/local/red/

Windows:
/Program Files/Red5/swf/

You should see the source (.fla), if you’re running Red5 on a remote server you’ll need to go into the fla and edit the following line:

nc.connect(“rtmp://localhost/oflaDemo”);

oflaDemo is the webapp name so it could say something like fitcDemo, etc

Flash CS4 F1 Help

F1 in flash is like an extra limb that without it seems nearly impossible to function fully on a regular basis.  Adobe, in their endless line of random changes made to Flash in the CS4 release, has chosen to take away my limb with no hope in sight of a reattachment.

After searching Google for a bit I found a few solutions; the best of which is from Adobe’s Flash forum

1. Go to Window/Extensions/Connections
2. Click on the context menu (upper right-hand corner)
3. Select “Keep me offline”
4. You’re good to go. Now when you press F1, the browser will open and look for the local files.

The file URL for Mac is listed as being something like this:
/Library/Application Support/Adobe/Help/en_US/Flash/10.0_UsingFlash/WS123AB45C-12AB-12A3-1A2B-1234A56BC9D9.html

this is what the Windows version is supposed to look like (didn’t verify it):
C:/Program Files/Common
Files/Adobe/Help/en_US/Flash/10.0_UsingFlash/WS123AB45C-12AB-12A3-1A2B-1234A56BC9D9.html

Hope this helps someone.