< Day Day Up > |
Several sample JSFL implementations are included with Flash 8. You can review and install these files to familiarize yourself with the JavaScript API. The samples are installed in a folder named Samples/ExtendingFlash within the folder in which you installed Flash. For example, if you installed Flash using the default setting, the samples are placed in the following location:
Sample Shape commandA sample JavaScript API script named Shape.jsfl is located in the ExtendingFlash/Shape folder (see "Sample implementations" above). This script displays information about the contours of the shape in the Output panel. To install and run the Shape script:
Sample get and set filters commandA sample JavaScript API script named filtersGetSet.jsfl is located in the ExtendingFlash/filtersGetSet folder (see "Sample implementations" on page 19). This script adds filters to a selected object and displays information about the filters being added in the Output panel. To install and run the filtersGetSet script:
Sample PolyStar toolA sample JavaScript API script named PolyStar.jsfl is located in the ExtendingFlash/PolyStar folder (see "Sample implementations" on page 19). The PolyStar.jsfl replicates the PolyStar tool that can be found in the Flash Tools panel. The script demonstrates how to build the PolyStar tool using the JavaScript API, and includes detailed comments describing what the code is doing. Read this file to gain a better understanding of how the JavaScript API can be used. You should also read the PolyStar.xml file in the Tools directory to learn more about how to build your own tool. Flash includes an earlier (obfuscated) version of the PolyStar.jsfl script that you must remove in order to use the sample PolyStar.jsfl file. To remove the earlier version of the PolyStar.jsfl file that was installed with Flash:
To install the updated PolyStar example files:
Sample Trace Bitmap panelA set of files named TraceBitmap.fla and TraceBitmap.swf are located in the ExtendingFlash/TraceBitmapPanel folder (see "Sample implementations" on page 19). These files illustrate how to design and build a panel to control the functions of Flash. They also show the use of the MMExecute() function to call JavaScript commands from an ActionScript script. To run the TraceBitmap sample:
Sample DLLA sample DLL implementation is located in the ExtendingFlash/dllSampleComputeSum folder (see "Sample implementations" on page 19). For more information about building DLLs, see Chapter 3, "C-Level Extensibility," on page 533. |
< Day Day Up > |