AIR allows to to use ActionScript libraries (SWC compiled files) within your AIR applications. It means that you can take advantage of all the methods and features of ActionScript libraries in JavaScript AIR apps.
In order to properly access a SWC library via JavaScript you need to follow these simple steps:
- Download any ActionScript library in SWC format. You could for istance use the the corelib.swc (http://code.google.com/p/as3corelib/) and rename the extension of the file to zip (or any archive format).
- Next, extract the file and take the library.swf file from the package.
- Rename the file corelib.swf, and place it into your project directory.
Finally, place the following tag in your application to include the library:
<script type="application/x-shockwave-flash" src="corelib.swf"> </script>
You can now invoke any methods of the library:
import com.adobe.utils.ArrayUtil;
var isEqual = new com.adobe.utils.ArrayUtil.arraysAreEqual(array1,array2)






















You are a genius. Thank you! Fzip here I come...
Posted by: David | June 24, 2009 at 12:02 PM