The next portion of the RolloverScript affects the movie clip of the spinning dancer. The movie clip object is called /dancer, after the name of the performer. For this movie clip, two elements are important: the transparency and the portion of the clip being played . The movie clip is made more opaque when it plays and less opaque when it stops; the Alpha property handles transparency.
Because I want different buttons to play different portions of the movie clip, a variable is used in combination with the Go and Play action. This variable, dancer_framelabel, is set in each of the buttons . I also want to be sure that the first time the movie clip plays, it starts from the beginning. To base an action on a current property of an object, you use what is referred to, in programming jargon, as a conditional statement. One such conditional statement in Flash is the If-Else-End-If series: If my condition is met, do this action; else, do that one.
Follow these steps to reconstruct the Dancer Control in the RolloverScript: