ActionScript (deprecated)#
The ActionScript Module has been deprecated.
To install, please contact Lattix to obtain the ActionScript module. Unzip and extract the file actionscript_plugin.jar. Copy this file into the bin/plugins sub-directory of your Lattix installation. On Windows, this is typically C:Program FilesLattix9.xbinplugins. Now you can start Lattix and the ActionScript module will be available.
The ActionScript module allows users to load ActionScript project using two different approaches:
Load compiled swf/swc files
Load link-report.xml file
Install#
Download and Install the ActionScript Module in Lattix#
Unzip and extract the file actionscript_plugin.jar.
Copy actionscript_plugin.jar into the bin/plugins sub-directory of your Lattix installation. On Windows, this is typically C:Program FilesLattix8.xbinplugins.
Restart Lattix and you should see ActionScript in the Module Dropdown list in the New Project Dialog.
Download and Copy Flex SDK jar files#
In order for the ActionScript module to work, you must copy the jar files, asc.jar and swfutils.jar into the lib folder in your Lattix installation. Please perform the following steps to retrieve and copy the jar files.
Download Flex SDK from Adobe:http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. The asc.jar and swfutils.jar are located in the lib folder in Adobe’s Flex SDK.
Copy the asc.jar and swfutils.jar files into the lib/plugins folder where Lattix is installed.
You are now ready to use the ActionScript Module.
Note: Lattix was tested with Flex SDK version 4.0.0.14159. Please let us know if you run into any problems with a different version of the Flex SDK.
Create a Project#
You can create a project with the ActionScript module for the following input file types:
Select SWF or SWC for Input Source and then browse to find and select the swf and swc files that you want to load in.
Select Link Reports File for Input Source and then browse to find and select the xml file that contains the link information.
Link-Report.xml File#
The ActionScript module allows user to create a Lattix project by loading in the link-report.xml file generated by the Flex compiler mxmlc. In order to load the project into Architect, it is necessary to first compile the project and generate a link-report.xml file. This approach allows the users to analyze dependencies at the class level.
You can generate the file by setting the link-report compiler option as follow, when compiling the project from a command line:
mxmlc -link-report link-report.xml actionscriptFile.as
-link-report link-report.xml
An XML file will be created inside the /bin folder of your project once the compiler successfully builds the SWF file.
The link-report.xml File’s Content#
Here is an example of a link-report file’s content:
<report>
<scripts>
<script name="C:\workspace\HelloWorld\src\account\SavingAccount.as"
mod="1270042893374" size="1109" optimizedsize="470">
<def id="account:SavingAccount" />
<pre id="Object" />
<dep id="AS3" />
</script>
<script name="C:\workspace\HelloWorld\src\HelloWorld.as"
mod="1270043489310" size="1113" optimizedsize="776">
<def id="HelloWorld" />
<pre id="flash.display:Sprite" />
<dep id="flash.text:TextFieldAutoSize" />
<dep id="flash.text:TextField" />
<dep id="account:SavingAccount" />
<dep id="trace" />
<dep id="AS3" />
</script>
</scripts>
<external-defs>
<ext id="flash.text:TextFieldAutoSize" />
<ext id="flash.display:Sprite" />
<ext id="AS3" />
<ext id="Object" />
<ext id="trace" />
<ext id="flash.text:TextField" />
</external-defs>
</report>
Note*:
<script>: indicates the name of a compilation unit used in the creation of the application SWF file.
<def>: indicates the name of a definition.
<pre>: Indicates a definition that must be linked in to the SWF file before the current definition is linked in.
<dep>: indicates other definitions that this definition depends on.
<ext>: indicates a dependency to an asset that was not linked in.
Options#
Do Not Load Members
Load Members for Specified Elements
Load All Members
Dependencies For Members
Load Member Dependencies
Do Not Load Member Dependencies
Atom Types and Dependency Kinds#
With the SWF/SWC option, the ActionScript module generates the following types of atoms:
Class
Class.Method
Class.Field
Interface
Interface.Method
Also, the following kinds of dependencies are generated:
Class Reference: Reference to class name.
Data Member Reference: Reference to a field in a class.
Implements: Implement an interface.
Inheritance: Class inheritance.
Method Invocation: Method call.
Limitations#
ActionScript is a dynamic language. Therefore, some dependencies may not be discovered by static analysis.