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:

  1. A working copy of Adobe Flash installed.
  2. A folder containing at least one ActionScript library for Flash to target.

Step 1

Accessing the ActionScript Settings Panel

  • Drop-Down Menu
  • 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.
  • Flash Preferences

Step 2

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.
  • ActionScript folder
  • Go back to the ActionScript 3.0 Settings panel and click the [+] button. Paste the path on the new line and click [OK].
  • ActionScript 3.0 Settings
  • Click [OK] from the preferences window.

Step 3

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.
  • Test.as
  • Because the class is contained within a folder from my ActionScript path, I can access it as though it’s part of the project.
  • Actions Panel
  • A quick Publish Preview reveals that the trace command has been successfully executed from my Test class, and everything is working as expected.
  • Output Panel