Use Axdt
Table of Contents
Screencast(s)
There is an old screen cast describing the installation and first use for version 0.0.2.
User documentation
Quickstart
Create Project
- Open AXDT Perspective "Window" > "Open Perspective" > "Other..." > "AXDT"
- If the AXDT Perspective is not shown in the list Read InstallAxdt again.
- Create a sample project "New" > "Projekt..." > "AXDT" > "AXDT Project" > name="test"
- Right now the layout should look like this:
- test (with an axdt logo) > src
Compile AS File
- Now create a ActionScript 3 file in the src directory with "New" > "AS3 File" > source folder="/test/src/" package="org.axdt" name="Test"
- As you can see the folder will be automatically created and the file contains this:
package org.axdt{ public class Test { } } - For now override the content with following snipped and save.
package org.axdt{ import flash.display.*; import flash.events.*; public class Test extends Sprite { public function Test () { stage.addEventListener(MouseEvent.CLICK, clickListener); } private function clickListener (e:MouseEvent):void { if (e.target == stage) { drawCircle(e.stageX, e.stageY); } else { removeChild(DisplayObject(e.target)); } } public function drawCircle (x:int, y:int):void { var randomColor:int = Math.floor(Math.random()*0xFFFFFF); var randomSize:int = 10 + Math.floor(Math.random()*150); var circle:Sprite = new Sprite(); circle.graphics.beginFill(randomColor, 1); circle.graphics.lineStyle(); circle.graphics.drawEllipse(0, 0,randomSize, randomSize); circle.x = x-randomSize/2; circle.y = y-randomSize/2; addChild(circle); } } } - You can now select the launcher with "Run as.." > "Compile and Open a SWF File"
- The compilation progress either is shown in the Progress View or the bottom right corner of the window.
- You can open up a Console View to view the the compiler output like compilation errors.
- As soon as the swf file is compiled the deploy folder will appear and the swf view will open.
- If you see a blank page refer to GuideViewer for now and set up you eclipse browser.
- You can test the "As3Test.swf" and click on the canvas to create circles.
Compile Mxml File
- mxml files are also accepted as build targets. Use the wizard to create a MXML File within the project "New" > "MXML File" > name="MxmlTest"
- Note: there is mxml content assist available for the standard eclipse xml editor (WST).
- For now fill the content with:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script><![CDATA[ public function copy():void { txtIn.text = hello_label.text; } ]]></mx:Script> <mx:Label id="hello_label"> <mx:text>Hello World!</mx:text> </mx:Label> <mx:Button id="btn" label="Click me!" click="copy()" /> <mx:TextInput id="txtIn" text="not clicked" /> </mx:Application> - You can call the same launcher as described above.
- The initial build is usually slow, however compiling a target a second time will be much fast thanks to incremental compilation.
