Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nested clips targeting other clips on root.. 1

Status
Not open for further replies.

coldfused

Technical User
Jan 27, 2001
2,442
US
ok check this out guys.

3 frame movie

each frame has seperate clips

frame two has a animation clip nested inside another clip, so two clips up on frame two of root has navigation button "back"

i need to get back to root frame 1 clip "intro" frame 250 of that clip

here is what i have on the button:

on (release) {
_root.intro.gotoAndPlay(250);
}

not working. Why?

Thanks in advance...

---------------------------------------------
 
Most probably because "intro" is not present on the second frame of your movie.
Either have it present on frame 2 (even if it's positioned off-stage), or pass a variable on your above button script (condition = true), move the playhead to the root's frame 1, and have an if statement re-direct the intro clip to frame 250, if the condition is true.
 
On the back button...

on (release) {
_root.back_condition = true;
_root.gotoAndStop(1);
}

On _root's frame 1...

stop();
if(_root.back_condition == true){
_root.intro.gotoAndPlay(250);
}
 
Ok so that worked, kinda...

I forgot to mention I guess that there are also two scenes. All this happens in scene2.

So when the button action sets the condition and goes to root.frame1 it's going to frame 1 of the welcome scene or the previous scene, not the same scene the buttons in?

Idea?

---------------------------------------------
 
Well, you should know by that targeting a frame number is allways more error prone (and it's a cumulative number of the whole timeline frames), than targeting a labeled frame. So label frame 1 of your Scene 2 with an unique label such as my_scene2 (no number only labels or at least not starting off with a number), and target that labeled frame on your button's script...

on (release) {
_root.back_condition = true;
_root.gotoAndStop("my_scene2");
}


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top