I've got a looping animation using code similar to this:
self.anim = MovieClip.new{
{1, 10, self.animFrames[1]},
{11, 20, self.animFrames[2]}
}
self.anim:setGotoAction(20, 1) |
I want to trigger a sound every time the loop starts (so on frame 1 of the animation). Is there any way of doing this? If so, can it be used to trigger on any frame of the animation (e.g. if I wanted to trigger a sound on frame 5)?
Thanks
Pete
Comments
The only way to do this would be to create a new class that wraps lists of smaller movie clips that you'd chain together in a seemless sequence, however you'd then be able to pickup the end of a smaller sequence (using the COMPLETE event), trigger whatever event you wanted (sound effects etc) and then continue the sequence.
Alternatively you could create a new class that was inspired by MovieClip and had these extra features.
Sorry I couldn't be of any more help.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill