Hello,
I've tried the different methods on a Movieclip object. I have 10 sprites
and want to stop it there (this one is transparent). I also tried the
event handler but this didn't work.
First I defined:
explosionMovieClip:setGotoAction(10 * frameMultiplier, 1)
explosionMovieClip:setPosition(-100, -100) -- Off screen.
explosionMovieClip:stop()
stage:addChild(explosionMovieClip)
At a collission (onBeginContact) I do:
explosionMovieClip:gotoAndPlay(1)
The movie is starting over and over again.
Thanks,
Marc
Comments
movieclip:setStopAction(numberframe)
Thanks, this didn't work:
explosionMovieClip:setGotoAction(10 * frameMultiplier, 1)
explosionMovieClip:setPosition(-100, -100) -- Off screen.
explosionMovieClip:stop()
explosionMovieClip:setStopAction(10)
stage:addChild(explosionMovieClip)
and this didn't work too:
explosionMovieClip:gotoAndPlay(1)
explosionMovieClip:setStopAction(10)
At every collision, I need to restart the 10 frames Movieclip.
So it starts with a first sprite and it ends at frame 10 with
a empty transparent sprite. I think that you could do it by
checking the array but I thought that it could be simpler.
Regards,
Marc
explosionMovieClip:setGotoAction(10 * frameMultiplier, 1)
explosionMovieClip:setPosition(-100, -100)
explosionMovieClip:setStopAction(10 * frameMultiplier)
stage:addChild(explosionMovieClip)
think in videoframes.
Marc
explosionMovieClip:setGotoAction(10 * frameMultiplier, 1)
which says when you reach frame 10 * frameMultiplier then go to frame 1
just so you know