I have a movie clip, asterixHolder, with multiple frames that is instructed, at times, to gotoAndPlay at a particular frame (where’currentSection’ is a number):
asterixHolder.gotoAndPlay("tween"+currentSection);
Nested inside asterixHolder is a clip called theAsterix that I want to continually rotate. I’ve been achieving this with a Timer Event:
var asterixTimer:Timer = new Timer(40, 0);
asterixTimer.addEventListener(TimerEvent.TIMER, timerHandler);
asterixTimer.start();
function timerHandler(eventObject:TimerEvent):void {
asterixHolder.theAsterix.rotation += 2;
}
However, when the TimerEvent code is included - or to be more precise, when the function timerHandler references asterixHolder - the previous code to send the clip to the appropriate frame does not work. Could anyone tell me why this is the case? It doesn’t seem logical that calling a nested clip should prevent the parent clip from doing anything.
I’m sure I’ve made a more fundamental mistake!
Thanks to anyone who can help.