PDA

Click to See Complete Forum and Search --> : Nesting


Eraser Nubbin
01-09-2006, 05:04 PM
Having trouble grasping the whole 'Nesting' concept in Flash.

http://www.hbxcontrols.com/index_tester.htm

I built the navigation for this training thing in a movie clip so that I could drop the whole thing into new scenes without having a buzillion things going on on the timeline.

What I am having trouble with is getting the sub-menu buttons to link to frame markers on the main timeline for starters, and then ideally to be able to have these sub-menu buttons guide the user from scene to scene.

This is the code that I have on the button, within the movie clip:

on (release){
_root.instanceOne.gotoandplay("test");
}

instanceOne = the instance name of the movie clip
test = the frame marker on the main timeline I wish the button to navigate to

Not sure what I am missing here, do I need to be referencing the instance of the button within the movie clip or just the movie clip itself? How do I get the button to direct to a seperate scene?

Thanks in advance.

Eraser Nubbin
01-11-2006, 09:59 PM
HMMmm must have stumped Mr. Wizard here...
Either that or I have reached my dumb question quota for the month...

Bear
01-12-2006, 10:33 AM
how're you calling the external swf in?

Eraser Nubbin
01-16-2006, 04:07 PM
I kind of changed my strategy a little, instead of linking the buttons to different scenes, I was told it would be way better to have the buttons import different SWF files.
This is the button code I have right now which brings up the external SWF.

on (release)
{
unloadMovieNum(1);
loadMovieNum("staging_changeTime.swf",1);
}

What I am not sure about is if I have buttons in that external SWF, is it possible to have them cause changes on the root timeline?

Thanks.

Bear
01-17-2006, 09:16 AM
assign tasks to affect _level0 so instead of root.gotoandstop, you would have _level0.gotoandstop. You're loading your swf's into level 1 (the 1 at the end bracket) so use _level1.gotoAndPlay() or whatever to affect the timeline in the loadedmovie.

Hope this makes sense

Eraser Nubbin
01-17-2006, 04:12 PM
Thanks Bear, I will take a swing at it.

casedsgn
01-25-2006, 04:23 AM
Loading into levels is a hard thing to track... it actually makes a little more sense to use _root if you have to target all the way back to the main timeline, but best practice is to use _parent in order to keep the highest level of portablility.

However, first things first ... make sure your actionscript is properly "cased"... may not be the problem, but it doesn't hurt to maintain the standard. The actionscript editor doesn't recognize gotoandplay() , but it does recognize gotoAndPlay(). Try that first and see if you get a different result.

You're on the right track by loading external swfs vs. hoping to different frames. Great start. Try putting an empty movieclip on the stage, and give it an instance name of "nav_mc" . Now enter the actionscript to load your external swf into that empty movieclip, like this.

nav_mc.loadMovie("myExternalSwf.swf");

Now you know exactly how to target to and from your externally loaded .swf. To target anything inside the external clip, the absolute path would be: _root.nav_mc.clipInside . To target the _root timeline from inside the externally loaded swf, lets say a button on the root timeline of the externally loaded clip, you'd use: this._parent.

Confusing, I know ... but once you get it ... there'll be no stopping you. Let me know if you need some assistance, I'm happy to help.