I asked a question with a similar problem and got a great answer, so I apologize if this is a little frustrating. Hope it will be fast. I am developing an interactive Flash tutorial to explain a complex biological problem, and I structured the timeline so that there are no more than two frames and four layers. I designed it earlier on stage, but it got so confusing, and with a few problems, I decided that I had to redo it that way.
It consists of three main parts: the name, which disappears first in two segments, and then two buttons (which are disabled until they completely fade) and, finally, animations of molecules that disappear endlessly on the loop. Then the page remains ambient until the user clicks one of the buttons.
I have four levels on the main timeline - Actions, Buttons, Molecules and Headers. In each of them there are corresponding images and animations.
I want to encode it so that each is played sequentially after the other, but it's really hard for me to access other time frames through AS3.
I currently have this at the Actions level:
import flash.events.Event; NRPSText_mc.addEventListener(Event.ENTER_FRAME, FadeIn); function FadeIn(event:Event):void { if (MovieClip(this.root).currentFrame > 0) { NRPSText_mc.gotoAndPlay("NRPSFadeIn") } } ColourButton_mc.addEventListener(Event.ENTER_FRAME, BtnFadeIn); function BtnFadeIn(event:Event):void { if (NRPSText_mc.currentFrame == 30) { ColourButton_mc.gotoAndPlay("ButtonPress") } }
It follows clearly that I am marked by certain events on each timeline, and I want them to play upon completion.
The problem is to know what to put before the ".currentFrame" in each instance, and I cannot find it anywhere! So far I have managed to get using "this" and "MovieClip (this.root)", but I need to learn how to reference these built-in timelines to make it work. I tried these codes with "trace" and it seems to work fine, so I assume this is a problem.