You are here: Recent News » Projects » AsWing » AsWing tutorials » AsWing + FDT

 

AsWing + FDT

Tags : , ,

This tutorial will help you get setup with FDT and ASWing.

1) Download the ASWing source files from the website from the download section.

2) Unzip the file to a directory of your choice.

3) Create a new Flash Project by click on the File - > New - > New Flash Project.

aswfdt1.jpg

4) Type in the name of your project and click Next.

aswfdt2.jpg

5) Click on the Create Source Folder... button, type in “src” for the folder name and click

 on Finish.

aswfdt3.jpg

6) Click on Finish to complete the initial setup. Next right click on the src folder and create a new class

aswfdt4.jpg

7) Type in the class name and then click on Finish. In this example we will use Test.as.

aswfdt5.jpg

8) Next we add the aswing source folder to our project. Right click on the ASWingTest

 project and create a new linked library. Then click on the Add.. button and then click
 on the New.. button.

aswfdt6.jpg

9) Type in aswing for the name of the library and browse to the src folder of ASWing for the

 location. Then click on the OK button.

aswfdt7.jpg

10) Click on OK again. You can see that the path variable has been added.

aswfdt8.jpg

11) Click on Finish to complete adding the library to our project.

aswfdt9.jpg

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 ();
	}
}

13) Next let us setup our run time environment. Click on Run → Run.. . Click on the

  FDT - MTASC Support and click on the New button. Type in a name for the workspace.

aswfdt12.jpg

14) In the Project section click on the Browse.. button , select the ASWingTest project and

  click OK.

aswfdt10.jpg

15) In the Main Class section click on the Browse.. button , type in Test and select the Test.as

  from the list and click on OK

aswfdt11.jpg

16) Click on the MTASC Arguments and we can specify other MTASC options in there.

aswfdt13.jpg

17) Click on Run to compile the project. Below is the sample examples screenshot.

aswfdt14.jpg

projects/aswing/tutorials/how_to_use_aswing_with_the_fdt_and_mtasc.txt · Last modified: 2007/02/20 08:12 by niko