AS3 Quickstart
This is a quick reference I wrote for getting started in writing Actionscript3 / Flash9 applications, using all free tools. Note that this is aimed at Windows users (FlashDevelop (the IDE) is a windows-only tool). Later I will write a version aimed at Linux users (The Flex 2 SDK (the actual compiler) is written in cross-platform Java).
-
Install Flex 2 SDK
-
Install FlashDevelop 2.0.2+
-
Follow the installation instructions from the download page. The summary is below, but may be out of date:
-
Download Flex 3 SDK – You want “Adobe Flex SDK” – Get “Milestone” for production code, “Stable” for some newer updates that is reasonably stable, and “Nightly” for alpha code with the latest features
-
After unzipping somewhere, go to Tools→Program Settings→AS3Context→Flex SDK Location and set the path
-
-
Do Project → New Project… and pick an Actionscript 3 project. To compile & run hit F5, to compile only hit F8. trace()'s will go to the Output window if you compile in Debug mode.
-
Check out the neat auto code generator – in a nutshell, put your cursor on something and hit ctrl+shift+1 (see link for details on what places it works)
-
http://www.senocular.com/flash/tutorials/as3withmxmlc/ – some short tutorials. If using FlashDevelop as above, don't need to fiddle with .bat files or commandline, but the rest of the info is still good. Has HelloWorld, Drawing API, and simple EventHandling (onEnterFrame, mouse clicks, etc)
-
AS2 to AS3 quick reference – good for quickly looking up how things changed between AS2 and AS3
-
Check out the source from http://svn1.cvsdude.com/osflash/papervision3d/as3/trunk – put this URL directly into TortoiseSVN
-
Make sure to add the 'src' directory to your classpath. This can be done in project properties.
by adding the directory to the -sp argument in your @mxmlc tag
-
You can easily embed assets using the [Embed()] tag in your .as files.
-
NOTE: The path to the assets is relative to the .as file!
public class Main extends Sprite { [Embed(source="logo.png")] public var Logo:Class; public function Main() { var logo:Bitmap = new Logo(); addChild(logo); } }
-
AS3 Hello World
package { import flash.display.Sprite; import flash.text.TextField; [SWF(width="800", height="600", backgroundColor="#ffffff", frameRate="30")] public class HelloWorld extends Sprite { public function HelloWorld() { var display_txt:TextField = new TextField(); display_txt.text = "Hello World!"; addChild(display_txt); } } } -
MXML Hello World
<?xml version="1.0" encoding="utf-8"?> <!-- @mxmlc -default-size 400 300 --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" > <mx:Script> <![CDATA[ import mx.controls.Alert; public function doAlert():void { Alert.show("You clicked the button!", "Hello Alert"); } ]]> </mx:Script> <mx:VBox horizontalAlign="middle"> <mx:Label text="Hello World"/> <mx:Button label="click me!" click="doAlert()"/> </mx:VBox> </mx:Application>

[...] & licensing – Own It Flash Tutorials | FlashGuru Consulting Vectors for Flash Tile based games Robots w/Lasers » AS3 Quickstart Asual » [...]
Pingback by FlashBrighton » Blog Archive » Flash Links — November 20, 2007 @ 6:09 am
Thank you for any other magnificent article. The place else may
just anyone get that kind of info in such a perfect method of
writing? I’ve a presentation subsequent week, and I am at the search for such information.
Comment by best Gpt site — May 12, 2013 @ 1:17 pm
Tremendous things here. I am very happy to peer your article.
Thanks so much and I’m taking a look forward to touch you. Will you kindly drop me a mail?
Comment by castle ville — May 19, 2013 @ 5:30 pm