Configuring Flash in Eclipse using ASDT, MTASC and Flashout
Software Needed:
Installation:
Compilation:
Compiling a project using FlashOut:
- Eclipse
- MTASC
- ASDT
- Flashout
- Java JDK
Installation:
- Make sure the latest version of the Java JDK installed in your machine. Preferably J2SE 5.0 or higher. Install the JDK preferably in c:\program files\Java http://java.sun.com/j2se/index.jsp
- Download the latest version of the Eclipse IDE and extract it to c:\program files\Eclipse or any other folder you want. Create a shortcut, right click, go to properties and enter the following argument to the Target Path
C:\program files\Eclipse\eclipse.exe –clean - Download MTASC (Motion Twin ActionScript Compiler) and extract it to c:\program files\MTASC or any other folder you prefer.
- Installing ASDT (Actionscript Development Tool). Open eclipse, Help – Software updates - Add Site. Add the following url in the location text box. http://aseclipseplugin.sourceforge.net/updates and click ok. Check ASDT and click Finish.
- Download the latest version of Flashout and extract the content of the archive (excluding the Flashout.as file) into the eclipse plugin directory. Copy Flashout.as file onto your project directory or global flash class path.
Compilation:
- Goto Windows - Preferences
- Browse to Actionscript2 and MTASC and you would have a screen as shown below
- Now select Flashout and Point to the MTASC compiler and the Flash core classes and shown in the screen below
Compiling a project using FlashOut:
- Choose the Actionscript 2 perspective first. Goto Windows – Perspective – Actionscript 2
- Click New – New Actionscript 2 project, enter the name of the project and click ok. Make sure you check the standard core classes checkbox.
- Create a new AS file as follows. Src – com – sportingIndex – Main.as and enter the following code.
class com.sportingIndex.Main
{
private static var vTextField:TextField;
public static function main():Void
{
trace("Stage.width")
_root.createTextField("vTextField",1,50,50,250,250);
_root.vTextField.html=true;
_root.vTextField.htmlText="Hello! This is a flashout sample";
}
} - Right click on the project, create a new file and name is EclipseFlashOut.flashout
- Goto the SWF tab of Flashout and type in the following as shown in the screen below
- Now go to the Additionals tab and type the follow
-header 770:578:20 (Width, height and Frame Rate) - Now click Compile. You should see the following screen below.
Comments