30.11.10

Package and Import

First, a little history. When I started out programming in Actionscript, I would copy the code straight out of the book and put it into the actions panel. At the top of the code that I would copy were the words "Package" and "Import". Every time I would copy the code as-is I would receive an error (I will reproduce the error in a future post). I searched for the solution and it led me to download the Flex SDK. What I didn't know at the time is that the Flex SDK and Flex builder are already built into Flash CS5. The only way to use the package and import functions is to create an external Actionscript 3.0 class (.as) file and link it to the program. I had no idea how to do this, but learned eventually.

Package. The purpose of this tool is to group all of the local Actionscript 3.0 class files together so that they can share information with one another.

Import. The purpose of this tool is to import class files or folders full of class files for use in the program.

No comments:

Post a Comment