|
AsWing.org : FDT, MTASC and AsWing Tutorial
This page last changed on Jan 18, 2006 by iiley.
FDT, MTASC and AsWing TutorialThis tutorial will help you get started with FDT, MTASC and ASWing and assumes you have already installed FDT and MTASC. We hope to update this tutorial at a later date to also include basic instructions for installing MTASC and FDT. Step 1 - Download AsWingDownload the ASWing source archive and unzip the file to a directory of your choice. Note: You can also get the latest AsWing from CVS. Step 2 - Creating a simple AsWing projectCreate a new Flash Project - from the File menu, choose New then New Flash Project: ![]() Type in the name of your project (in our case, AsWingTest) and click on the Next button: ![]() Click on the Create Source Folder... button, type in src as the folder name and then click the Finish button: ![]() Right click on the src folder to get the context menu, and from the New sub-menu choose Class: ![]() Type in the class name (in our case, test) and then click the Finish button: ![]() Add the AsWing source folder to the project by right-clicking on the ASWingTest project to get the context menu. Choose New then Linked Libraries as shown below: ![]() Type in AsWing for the name of the library and for the location, browse to the src folder of AsWing: ![]() Click on the OK button to store the values and you'll see that the path variable has been added: ![]() Click on Finish to complete adding the library to our project: ![]() 12) Add the following code to the Test.as file: /** * @author firdosh */ import org.aswing. *; class Test extends JWindow { private var myButton : JButton; public function Test (Void) { super (_root, true); myButton = new JButton ("Test"); getContentPane ().append (myButton, BorderLayout.NORTH); } public static function main (Void) : Void { var myWindow : Test = new Test (); myWindow.setLocation (50, 50); myWindow.setSize (300, 300); myWindow.show (); } } Step 3 - Setting up Runtime EnvironmentClick on Run and choose Run... then select FDT - MTASC Support and click on the New button. Type in a name for the workspace as shown below: ![]() In the "Project" section click on the Browse... button then select the ASWingTest project and click the OK button: ![]() In the "Main Class" section click on the Browse... button then type in Test and select the Test.as file from the list and click on the OK button: ![]() Click on the MTASC Arguments and we specify additional MTASC options as shown below: ![]() Click on Run to compile the project and you should see something like the following: ![]() |
| Document generated by Confluence on Dec 19, 2006 14:17 |