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

External Scripts

In addition to typing your scripts in the Actions panel, you can store your scripts in external text files that are included when you export a .swf. Although all the other techniques covered in this chapter involve ways to import data while the movie plays, external scripts become locked inside the movie when you export. (It would be nice if changes to an external script could be reflected in a previously exported .swf, but it doesn’t work that way.)

External scripts can still make you more efficient. If the same script is used in several places within one movie, and perhaps even used in several different movies, you can store that script in a single “external script” file. If at any time during production you find that you want to adjust or fix that script, you need to do it in only one place. Movies exported from that point forward would see the change—in every place where the script was used. It’s even more powerful when your site structure is broken into several movies (that get loaded via loadMovie()). That way, a change in a single external script will be reflected in every movie that accesses it once you re-export all your .swfs. Basically, it just takes a bit of planning.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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