Oneupweb : How to Setup an Actionscript Folder
It’s very common to use third party ActionScript libraries, such as Papervision3D, in a flash project. Typically, that would mean downloading the library and unzipping its contents into your project folder. But, what if you want to reuse the library for other projects? This tutorial will show you how to setup an ActionScript folder which can be targeted by the Flash User Interface (Flash UI), allowing access to all of your libraries from any project.
Adobe Flash CS3 Professional was used to create this tutorial. Please note that the desired effect should carry over to other versions, but may require some adjustments.
Before you begin, there are a couple things you’ll need to have ready:
- A working copy of Adobe Flash installed.
- A folder containing at least one ActionScript library for Flash to target.
Accessing the ActionScript Settings Panel
- Start by opening the Flash client on your computer.
- Once loaded, access the preferences window by selecting Edit -> Preferences from the drop-down menu at the top.
- Select ActionScript from the Category pane on the left, then click the [ActionScript 3.0 Settings] button.
Setting up the ActionScript Folder
- If you haven’t already, you’ll need to setup a folder to hold all of your ActionScript libraries.
- Please note that projects should never be placed within this folder.
- Navigate to your ActionScript folder and copy the file path.
- Go back to the ActionScript 3.0 Settings panel and click the [+] button. Paste the path on the new line and click [OK].
- Click [OK] from the preferences window.
Testing an ActionScript Library
- To test the library, create a new Flash File and access the Actions panel.
- For my test, I created a very basic class which traces a message upon instantiation.
- Because the class is contained within a folder from my ActionScript path, I can access it as though it’s part of the project.
- A quick Publish Preview reveals that the trace command has been successfully executed from my Test class, and everything is working as expected.