PDA

View Full Version : another stupid question on paths


tdi-guy
04-25-2006, 02:02 PM
So I'm still ripping my hair out,

movie1 loads movie2 into level1

I want movie2 (with buttons) to navigate to the different scenes in movie1

how do i do this.

I tried

s4.onRelease = function (){
_parent.gotoandPlay ("scene6");
}

s4.onRelease = function (){
_root.gotoandPlay ("scene6");
}

s4.onRelease = function (){
_root.root.gotoandPlay ("scene6");
}

no luck.

can someone help me out AGAIN

thanks

Cota
04-25-2006, 06:18 PM
Never target a scene...create a frame label on the first frame of the scene in question and target that. gotoAndPlay("FrameLabel");

tdi-guy
04-26-2006, 03:54 PM
That's exactly what i did, just turns out my frame labels are the same as my Scenes (without the capital "S")

Can someone show me the correct path from the loaded movie in level 1 to the root movie.

thanks

Cota
04-26-2006, 05:18 PM
s4.onRelease = function (){
_root.gotoandPlay ("scene6");
}

That should work...

If you need to path to level1, then just use, level1.

tg
04-26-2006, 06:22 PM
dont forget to use the trace statement.

you could put this into your button:

trace(this);// the button;
trace(_parent);// the parent of the button (movie2)
trace(_parent._parent);//should be _root

but what you want is gonna be something like:

_parent._parent.movie1.gotoAndPlay("framelabel");
//or as cota mentioned
_root.movie1.gotoAndPlay('framelabel').//this one should get you there for sure.

but you will definitly need to target the mc you want to control

tg
04-26-2006, 06:29 PM
bah!

crap.

my code is gonna work if you are loading into movieclips.... probably wont work if loading into levels..... cota's will most likely take you there. his code usually will.

tdi-guy
04-27-2006, 12:50 PM
Ok i admit i have no clue what i'm doing.

s1.onRelease = function (){
_root.gotoandPlay ("scene3");
}
s1.onRelease = function (){
_root.root.gotoandPlay ("scene3");
}
s1.onRelease = function (){
_parent.gotoandPlay ("scene3");
}
s1.onRelease = function (){
_parent.parent.gotoandPlay ("scene3");
}
s1.onRelease = function (){
_root.parent.gotoandPlay ("scene3");
}
s1.onRelease = function (){
_parent.root.gotoandPlay ("scene3");
}


none of these work.

-------------------------------------------------------------------------

ok maybe i didn't explain it right.

(1) movie1 starts up

(2) movie1 loads movie2 in level1

(3) movie2 has buttons

(4) cliking the buttons in movie2 controls the navigation of movie1

(5)all the scenes in movie1 have frame labels ("scene3")

thanks

tdi-guy
04-27-2006, 04:55 PM
dont forget to use the trace statement.

you could put this into your button:

trace(this);// the button;
trace(_parent);// the parent of the button (movie2)
trace(_parent._parent);//should be _root



I put your code in frame one of movie2 and these are the results I got.

trace(this); = undefined
trace(_parent); = level0
trace(_parent._parent); = undefined

I'm getting confused

tdi-guy
04-27-2006, 06:02 PM
Well after doing lots of reading and searching i found this post

http://www.actionscripts.org/forums/showthread.php3?t=92481&highlight=proper+syntax

s1.onRelease = function (){
_level0.gotoAndPlay("scene3");
}


voila everything works and actually makes sense.