Skip to main content
Participant
May 11, 2007
Question

how to check if movie is at last frame, if so: don't play it

  • May 11, 2007
  • 1 reply
  • 281 views
hello all,

this is the situation:

i have some buttons in the form of some stones.
when a user clicks on a stone a glow builds from the inside (this is done by a movie with a growing circle, this movie has a blend setting = 'add').
when the glow-movie reaches it biggest point (ie. the last frame) it stops.
the button has a small script which on pressing of the mouse starts playing the movie (that is on another layer). so far so good.

but when the same button is clicked again the glow starts all over again. i just want it to stay at the last frame so there is only one moment when the glow grows, afterwards clicking again won't make any difference. the glow stays like it is.
how can this be done?

can i let actionscript check at which frame the glow-movie is at and if it is at the last frame then don't play the movie again??

thank you for all your help (and have a good weekend)

- j
This topic has been closed for replies.

1 reply

Inspiring
May 11, 2007
if(_mc._currentframe != _mc._totalframes) {
_mc.play();
}

replace _mc with the instance name of movieclip