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

Flash and JavaScript

Scripting Flash movies in the browser follows the same rules as scripting any plug-in media type (see Chapter 15, “Plug-Ins, ActiveX, and Java,” for more on this). Whenever you want Flash movies to talk to the browser or the browser to give commands to the Flash Player, you use Flash ActionScript to send JavaScript instructions, or JavaScript to send ActionScript code.

Scripting In: Using JavaScript to Control Flash

A variety of JavaScript commands exist for communicating with the Flash Player, in its plug-in and its ActiveX forms. Table 16.6 lists some of the most commonly used of them. As you can see from examining the figure, it’s possible to send the Flash movie to a certain frame in its timeline, to start and stop playback, and even to control embedded movie clips by setting their properties and controlling their timelines.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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