This content has been marked as final. Show 3 replies
> I have a timeline where each frame has a different movieclip.
> each of these movieclips have 5 specific frames inside them.
I'm with ya so far.
> I can jump between frames on the main timeline by doing this;
> this._parent.gotoAndStop(2); this brings me to the first frame
> of the movie clip.
That part confuses me. Where is that line of ActionScript? If the code
appears in a keyframe of the main timeline itself -- and if you wanted to
move the main timeline's playhead -- you could use this:
this.gotoAndStop(frame number here);
That fact that you're prefixing the MovieClip.gotoAndStop() method this
this._parent means your code must be inside a keyframe of the first of your
movie clips. But I'm not sure how gotoAndStop(2) would take you to the
first frame. Second frame, yes.
> but if i want to do the same thing but go direcly to the 5th frame
> in said movieclip what do I do?
The frame you want to jump to is determined by the number you feed in as
a parameter. gotoAndStop(5) takes you to frame 5. The question of *which*
timeline should be jumped around depends on a) your object reference (e.g.
this, or this._parent, or an instance name) and b) the location of the code
making the reference.
Co-author, Foundation Flash CS3 for Designers
"Luck is the residue of good design."
well your going to run into some difficulty here. the reason will be that, you cannot call to a movieclip (MC) that doesn't exist in the current location of the playhead, even though it's IN the file, it's not 'instantiated' at the time of the call, UNLESS you're are currently on the frame that it resides. so if your calling to advance the timeline of one of the other clips you will need to first send the playhead to the frame where the clip resides, then make a call to goto to the frame in the clip. you will need to also set a variable to do so for each call. so for each call to a frame on the main timeline first you would set the 'page' (lets say) variable, then on each frame of the main timeline, you would also then use that variable to navigate to a frame in the clip on that frame. so you would say:
and in the actions layer on frame two (and all frames) you would have the statement:
'the_mcName' should be the instance name of the MC on that frame.
EDIT- lol - sorry David hadn't seen you post here :)