• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. ActionScript Authoring Envir... > Externalizing ActionScript Code

16.7. Externalizing ActionScript Code

ActionScript code can be saved in external text files (which use the .as extension, by convention) or .swf files and imported into a Flash document. By maintaining code in external files, we facilitate the use of standard code libraries across many projects. We can import external code into Flash using Import From File, the #include directive, or a shared library.

16.7.1. Import From File (Author-Time Import)

While editing a .fla file, we can bring code into the Action panel's Script pane using Import From File, found under the pop-up Options menu button in the top-right corner of the Actions panel (see Figure 16-1). Import From File is a one-time operation that copies the contents of the external file into the Actions panel, replacing any script currently there. Code imported via Import From File is not persistently linked to the .fla file in any way. To append or insert script text instead of replacing it, you must manually copy and paste the text from an external text-editing application.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint