PDA

View Full Version : mc control help, back to


kelleykb
03-20-2006, 05:01 PM
I require a mc inside a mc inside a mc. For help I will call them mc1, mc2, and mc3.

In mc2 buttons to go to certain instances in mc3. Now in mc3 I need to return to mc2 at a certain point, frame 215 (were all animation is stopped) inside each mc3 instance. It is ment to resemble a "close" window function.

I used this simple behavior yet it does not do anything.

on (release) {

//Movieclip GotoAndStop Behavior
_root.mcback.gotoAndStop("backreturn");
//End Behavior

}

If you need to see this in action, the site rough is available at http://www.doggydeelites.com/index3.html

oldnewbie
03-20-2006, 05:12 PM
Assuming mc3 is nested in mc2 (right?), and that from mc3 you're targeting a labeled frame "backreturn" in mc2, have you tried...

_parent.gotoAndStop("backreturn");

kelleykb
03-21-2006, 08:48 PM
Got it but it needed more ;-)

nested mc3 needed to go back to a instance in mc2 (it's parent), as you described. Using just the _parent button behavior still had it not closing the m3 instance. So I got it figured out... okay it maybe going back to "backreturrn" in mc2 but mc3 instance is not closing.... so searching the in the preset behaviors over I found this worked great

on (press) {

//Movieclip GotoAndStop Behavior
this._parent.gotoAndStop("myinstancename in");

//End Behavior

}
on (release) {

//unload Movie Behavior
if(this == Number(this)){
unloadMovieNum(this);
} else {
this.unloadMovie();
}
//End Behavior

}

So now I click on my button and the information pages comes up and over the area I designated (nested movieclip) then I add a "close" button on this information page and add this behavior to it creating the sense this is a "pop up window" with out needing to use java or some thing not actionscript ;-)

Thanks for the help though it was not quite the answer it helped me figure it out :D