Figure 16.53 lists common Flash ActionScript 3.0 functions. By attaching these functions to frames and symbols, you can build some fairly complex Flash movies.
Function : Description
gotoAndPlay : Jump to a frame or scene in another part of the movie and start playing the movie.
gotoAndStop : Jump to a frame or scene in another part of the movie and stop the movie.
play : Start playing a movie from the beginning, or from wherever it has been stopped.
stop : Stop a movie.
SoundMixer.stopAll : Stop the sound track without affecting the movie.
navigateToUrl : Load a URL into a new or existing browser window.
Loader class : Load a SWF or JPEG file into the Flash Player from the current
: movie. Can also load another SWF into a particular movie.
framesLoaded : Check whether certain frames have been loaded.
addEventListener : Assign functions to a movie clip based on specific events. The events include load, unload, enterFrame, mouseUp, mouseDown, mouseMove, keyUp, keyDown and data.
if : Set up condition statements that run only when the condition is true.
while/do while : Run a collection of statements while a condition statement is true.
trace : Display programming notes or variable values while testing a movie.
Math.random : Returns a random number less than or equal to 0 and less than 1.
Fig. 16.53 | Common ActionScript functions.
Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.