How to Save JSFL files with Flash CS5

May 30, 2010

CS5, JavaScript

You can have JSFL scripts available within the Flash authoring environment by storing them in one of several folders within the Configuration folder. By default, the Configuration folder is in the following location:

  • Windows® Vista™ and Windows® 7™:boot drive\Users\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\
  • Windows XP:boot drive\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\
  • Mac OS® X:Macintosh HD/Users/username/Library/Application Support/Adobe/Flash CS5/language/Configuration/

To determine the location of the Configuration folder, use fl.configDirectory or fl.configURI, as shown in the following example:

// store directory to a variable
var configDir = fl.configDirectory;
// display directory in the Output panel
fl.trace(fl.configDirectory);

Within the Configuration folder, the following folders can contain scripts that you can access in the authoring environment: Behaviors (to support the user interface for behaviors); Commands (for scripts that appear on the Commands menu); JavaScript (for scripts used by Script Assist to populate the user interface controls); Tools (for extensible tools in the Tools panel); and WindowSWF (for panels that appear in the Windows menu). This document focuses on scripts used for commands and tools.

If you edit a script in the Commands folder, the new script is immediately available in Flash. If you edit a script for an extensible tool, close and restart Flash, or else use the fl.reloadTools() command. However, if you used a script to add an extensible tool to the Tools panel and you then edit the script, either remove and then add the tool to the Tools panel again, or else close and restart Flash for the revised tool to be available.

There are two locations where you can store command and tool files so they can be accessed in the authoring environment.

  • For scripts that appear as items in the Commands menu, save the JSFL file in the Commands folder in the following location:
    Operating system Location
    Windows Vista boot drive\Users\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\Commands
    Windows XP boot drive\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\Commands
    Mac OS X Macintosh HD/Users/userName/Library/Application Support/Adobe/Flash CS5/language/Configuration/Commands
  • For scripts that appear as extensible tools in the Tools panel, save the JSFL file in the Tools folder in the following location:
    Operating system Location
    Windows Vista boot drive\Users\username\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\Tools
    Windows XP boot drive\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash CS5\language\Configuration\Tools
    Mac OS X Macintosh HD/Users/userName/Library/Application Support/Adobe/Flash CS5/language/Configuration/Tools

If a JSFL file has other files that go with it, such as XML files, store them in the same directory as the JSFL file.

, , ,

Trackbacks/Pingbacks

  1. How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … « action script - May 30, 2010

    [...] Więcej: How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

  2. How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … | Flash Designers - May 30, 2010

    [...] View original post here:  How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

  3. How to run JSFL scripts | Flash tutorials | Flash video tutorials | Flash actionscript | flash animation | flash menu | flashconf.com - May 30, 2010

    [...] the JSFL file for the tool and any other associated files to the Tools folder (see How to Save JSFL files with Flash CS5 [...]

  4. How do I make my MacBook open files that I download automatically? | Downloads - May 31, 2010

    [...] How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

  5. Dsi Download – Download More Than 150,000 Dsi Games And Files !! | Downloads - May 31, 2010

    [...] How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

  6. how do you download files onto your flash drive? | Downloads - May 31, 2010

    [...] How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

  7. Collaborative Course Authoring e-Learning Software Wins Gold Two Years in a Row « Free Software Download - June 1, 2010

    [...] How to Save JSFL files with Flash CS5 | Flash tutorials | Flash … [...]

Leave a Reply