views:

52

answers:

3

Hey Everyone,

Currently I am mostly a PHP/Javascript/CSS/HTML applications programmer. But I would like to start learning how to create flash movies also. However, I do not want to spend the money to get CS4. Can I create flash movies from only Actionscript 3? Or would anyone recommend that I jump straight to air? All of the different adobe products, which do the same thing, confuse me.

I just do not want to jump into it and then find out that I have to spend 900 dollars for the IDE. I really just want to code, and not have to use the IDE.

Thanks, Metropolis

+1  A: 

Use FlashDevelop :)

Here's the same code as tmdean's entered in Main.as when you create a new AS3 project in FlashDevelop.

package 
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.text.TextField;

    public class Main extends Sprite 
    {

        public function Main():void 
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }

        private function init(e:Event = null):void 
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point

            var tf:TextField = new TextField();

            tf.text = "Hello, world";

            addChild(tf);           
        }

    }

}

You do need a Java 1.6 JRE to compile with the Flex SDK and an Adobe Flash Player (Debugger version) to view your compiled SWF file (get the one that says Windows Flash Player 10 Projector content debugger if you're running Windows).

Details on the configuring FlashDevelop for AS3 development can be found at the FlashDevelop wiki.

Mr Roys
Is that all I would need? So I could just focus solely on Actionscript, and use FlashDevelop and I would be good?
Metropolis
Hi Metropolis, sorry couldn't reply promptly since it's sleeping time over here several hours ago :)Tmdean's Hello World example works well but I'll update this answer shortly with a FlashDevelop example of the same code.
Mr Roys
+2  A: 

Yes, you can create .swf files using only ActionScript if you use the Adobe's free Flex SDK. Even though it's the Flex compiler, it can be used to compile pure ActionScript programs.

Flex is an advanced UI toolkit built on top of Flash, which makes it easier to build applications with complex user interfaces in Flash. Flex applications are written in ActionScript and a HTML-like XML format (which is actually converted into ActionScript by the compiler behind-the-scenes). AIR is a platform that allows you to build standalone Flex applications that run outside of a web browser. I've never looked into if you an make a pure ActionScript AIR application, but my guess is no.

Here's an example of a hello world program in pure ActionScript. Save it in a file called Test.as and compile with the command line mxmlc Test.as.

package {
    import flash.display.Sprite;
    import flash.text.TextField;

    public class Test extends Sprite {
        public function Test():void {
            var tf:TextField = new TextField();

            tf.text = "Hello, world";

            addChild(tf);
        }
    }
}

FlashDevelop is an IDE for the Flex SDK. You still need to install the Flex SDK in order to use it.

Tmdean
Awesome thanks a lot for the help Tmdean. So, do I still need the flex SDK if I use FlashDevelop? or is it built in?
Metropolis
Also, I have read about the difference in adobes products before but I just wanted to be sure I got this right. Actionscript is the language that CS4 uses in the IDE for non coders, AIR is actionscript + javascript apps that can run as a desktop app, and Flex is a coders IDE for actionscript + javascript? They have made it all very confusing....
Metropolis
I've updated my answer to address your comments.
Tmdean
Great thanks again Tmdean for the information.
Metropolis
+1  A: 

Hello,

I advise you to look at the Haxe community.

Haxe is a language & compiler that can do a lot of things. It is fully open source and you can create .swf files with it without the need for CS4.

The community is driven by the author or MTASC which was the first open source ActionScript2 compiler.

Haxe is now fully compatible with AS3 & Flex I believe.

check http://haxe.org/

I Hope this will help Jerome Wagner

Jerome WAGNER
+1 Haxe is a nicer language to use in comparison to ActionScript 3, and there is good support for it inside FlashDevelop so there is no reason not to use it.
Jason Miesionczek