Jump To Content

LearnHub




Start using Flash for Free

Flash CS3 is way to expensive for me to ever buy. How will I ever get to make my useless Flash Intro?

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.

flash sdk photo

Unpacking

When that file is finished downloading unzip it and move it to Macintosh HD -> Developer -> SDKs

a picture of where to place the sdk

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. a picture of where to create the bundle folder

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)

a picture of where the build function is in TextMate for Actionscript 3

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

a picture of the flash project being built

This is what mine looks like in Safari

its built

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.


  1. wmoxam saidTue, 11 Mar 2008 15:04:31 -0000 ( Link )

    This is great stuff Andrew!

    Actions
    Vote
    Current Rating
    -1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

  2. laurellion saidFri, 11 Apr 2008 14:30:40 -0000 ( Link )

    Good tutorial Mr. Brown. I got to try Flex out some day soon.

    Actions
    Vote
    Current Rating
    -1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

  3. shubham95 saidSun, 18 Oct 2009 11:39:02 -0000 ( Link )

    nice

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

Your Comment
Textile is Enabled (View Reference)