
Intended Audience
* people with basic programming skills
* mac users
* subversion installed
* basic use of terminal
* don't have the money for Flash CS3 of Flash Builder
Good News for Programmers
If you wanted Flash but were scared by the cost of Flash CS3 then you're in luck.
Adobe gives away the Flex SDK for free and with a little hard work you can be building your flash intro that everyone will skip every-time they visit your web-site
Flex vs Flash
You can build the same kind of applications in both Flex and Flash.
* Flash is better for vector animation.
* Flex is better for building web-applications.
There is no immediate limitation I found between using either. I don't normally ever leave my text editor.
Getting Setup
Downloading
Grab the Flex SDK for free from the adobe web-site. Watch out because they almost trick you into getting Flash Builder. Here's what you want.

Unpacking
When that file is finished downloading unzip it and move it to Macintosh HD -> Developer -> SDKs
Next will need to create a folder for the TextMate
bundles we're going to need. So navigate to *AccountName ->
Library -> Application Support -> TextMate and
create a new folder called Bundles. If you don't find a TextMate
folder under Application Support try looking in the Library under
your Machintosh HD instead. 
Terminal Fun
Next you'll need to run the following in Terminal
Navigate to the directory with bundle
cd /Users/your_account_name/Library/Application\ Support/TextMate/Bundles
We need to do this so subversion will be able to download to this folder
export LC_CTYPE=en_US.UTF-8
Download the Flex Bundle
svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/Flex.tmbundle
Download the Actionscript 3 Bundle
svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/ActionScript\
Reload Bundles but restarting TextMate should work as well
osascript -e 'tell app "TextMate" to reload bundles'
Make the project
Open TextMate. File -> New for Template -> ActionScript 3 -> Project ActionsScript 3 and name it HelloWorld. Replace the HelloWorld function with the following code.
public function HelloWorld(){
super();
stage.addEventListener( Event.RESIZE, initialise );
var test:MovieClip = new MovieClip();
with (test.graphics)
{
clear();
beginFill(0x00FF00);
moveTo(10, 0);
lineTo(-10, 10);
lineTo(-5, 0);
lineTo(-10, -10);
lineTo(10, 0);
};
addChild(test);
test.x = 200;
test.y = 200;
}
Lets build it
Go to Bundles -> ActionScript 3 -> Build using… -> Build (mxmlc)

It should have hopefully built without any problems. Find the index.html file and open it in your favorite web-browser

This is what mine looks like in Safari

We did it!
Thats all you need to do to get setup with flash.
You're one step closer of fishing your intro flash page.
I showed you using TextMate but you don't have to use it. You could use TextEdit and build from the terminal if you really wanted to. It doesn't cover everything you need to know but its a start.
Post Comments