AS3 Class Definitions

When installing SWF Studio an ActionScript 3 component (SWC) file will be installed. When using ActionScript 3 and any of the SWF Studio API you must include this component in your project in order to publish your SWF. The component is installed to the Components folder for Flash CS3 if Flash CS3 is installed prior to installing SWF Studio.

If you have installed Flash after installing SWF Studio you will need to run helpsync.exe, located in the SWF Studio installation folder. Running that EXE will copy the help, codehinting, and component files the appropriate Flash folders.

In the Flash authoring environment:
1. Open the Components panel.
2. Open the "SWF Studio V3" folder.
3. Drag the "SWF Studio V3 AS3 API" component to the Library panel for your FLA.

In Flex Builder:
1. Open the Properties dialog for your project.
2. Select "Flex Build Path" from the left-hand menu (called "ActionScript Build Path" for ActionScript-only projects).
3. Select the "Library path" tab.
4. Click the "Add SWC..." button and choose the location of the SWC from the file open dialog. The SWC is called "coreAS3Definitions.swc" and is located in the SWC folder within the SWF Studio installation folder (default is C:\Program Files\Northcode\Studio3\SWC).

An alternative to including the component in your projects is to only setup Flash/Flex to be able to compile against the SWC. In Flash this means including the SWC in a classpath for your FLA, by either copying the SWC to an existing classpath or adding a classpath that points to the SWC. In Flex this means changing the Link Type option in the Library path section from "Merged into code" to "External". The advantages of this method are that compile times are faster and the resulting SWFs are about 70KB smaller. The disadvantage is that because the component is not actually compiled into your SWF any calls to the SWF Studio API when using your SWF outside of a SWF Studio-built application will result in runtime errors.

The SWC is called "coreAS3Definitions.swc" and is located in the SWC folder within the SWF Studio installation folder (default is C:\Program Files\Northcode\Studio3\SWC).

Note: In Flex Builder 3 the above procedure will allow you to compile your project, but you will not see codehinting. To get your project to compile as well as enable codehinting you will need to perform the following:

In Flex Builder 3:
1. Open the Properties dialog for your project.
2. Select "Flex Build Path" from the left-hand menu (called "ActionScript Build Path" for ActionScript-only projects).
3. Select the "Source path" tab.
4. Click the "Add Folder..." button and choose the location of the AS3 Definitions class files from the file open dialog. The folder is located in the AS3 Definitions folder within the SWF Studio installation folder (default is C:\Program Files\Northcode\Studio3\AS3 Definitions).