I asked before with a similar problem and received a great answer, so I apologise if this is a little frustrating. Hopefully it will be a quick one. I'm designing an interactive Flash tutorial in an effort to explain a complex biological problem, and I have structured the Timeline so that there are no more than two frames and four layers. I designed this before on the Stage timeline but it became so messy, and with a few problems, that I decided I had to redo it this way.
It consist of three main parts - A title that fades in first in two segments, followed by two buttons (that are disabled until they fully fade in) and finally animations of molecules that fade in and out indefinitely on a loop. The page then stays ambient until a user clicks one of the buttons.
I have four layers on the main timeline - Actions, Buttons, Molecules and Titles. In each are the relevant images and animations.
I want to code it so that each plays successively after the other, but I'm having real difficult accessing other timelines through AS3.
Currently I have this in the Actions layer:
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 should be clear from this that I've labelled certain events in each timeline, and I want them to play as one finishes.
The problem is knowing what to put before ".currentFrame" in each instance, and I can't find it anywhere! Until now I have been able to get by using "this" and "MovieClip(this.root)", but I need to be able to find out how to references these embedded timelines to make it work. I've tried these codes with "trace" and it seems to work fine, so I assume this is where the problem lies.