AS2:MTASCAndSwfmillWorkflow

From FlashDevelop

Jump to: navigation, search

TODO: reformat and add more detailed information

Simple pure ActionScript 2 sample project

Download the project, unzip and open "DemoProject.fdp" in FlashDevelop.

Notes:

Play: Press F8 to build or F5 to build and play the generated SWF. Looks at the Project properties for output/version configuration.

Trace: In Project properties, you can set the TraceMode.

Using Flash MM v2 components

MM v2 components (MM=Macromedia) are the interface components (buttons, list, combobox, etc) which are included since Macromedia Flash MX 2004. These components classes are all in the 'mx' package, that's why they are also often called mx components.

Legal note: an Adobe Flash license is required to use these components in your projects.

Download the project, unzip and open "MMComponentsDemo.fdp" in FlashDevelop.

Notes:

Detailed steps on using external component in a FlashDevelop project:

  1. Drop the components you need on stage and remove them. They will be included in the SWF library.
  2. Publish the SWF and in FlashDevelop: right-click on the file and select "Add to Library".
    • If you are using MM components, make sure you select "Use MX" in the project compiler options.
    • If you are using a third party SWC, you need to add the component's intrinsic classes to your project classpath.
  3. . Now you can use the components in your FlashDevelop project

How to attach MM V2 components at runtime?

  1. make sure you include the components in the library,
  2. use UIObject.createClassObject() method (apparently added to the MovieClip prototype during MM framework initialization):

Quote:

 In MM LiveDocs: 
 componentInstance.createClassObject(className, instanceName, depth, initObject):UIObject 

Code:

 // sample Button creation 
 var myButton = parentMc.createClassObject(mx.controls.Button, "myButton",
 parentMc.getNextHighestDepth(), { 
   label:"Hello world!", 
   _x:10, 
   _y:10, 
   _width:150 
 });

Other sample projects

http://www.flashdevelop.org/community/viewtopic.php?t=321

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox