Problem is I’m calling the green.swf within a different master movie and loading it via “loadMovie” command. But when I call green.swf from my master movie the windows within green.swf no longer swapDepths like they do within green.swf.
Menu_mc.One_btn.onRollOver = function () {
_root.content_mc.loadMovie(“swf/green.swf”);
};
I’m referencing the swapDepths within green.swf using the following code for three windows…green…red…blue…the example for red is below:
on (press, release, dragOver, dragOut) {
_root.x +=2;
_root.red.swapDepths(_root.x);
}
I figure I’m not referencing the mc in green.swf correctly when it comes into the master movie but I’m not sure how it should be referenced.
Is there anyway to compartmentalize the referencing so that the swapdepth call works nomatter their location or is the code you provided below the main way to do it and have it work when the mc is called from a parent movie?
imagine using _parent.mc as sort of a local reference, so it’s only going to work if the relationship between mc’s is correct. but the _root.mc.mc is more of an absolute reference. so it will work in more situations.
But I guess what your saying is that there really isn’t a way to reference it so that it works in all cases unless you have some variables in place and a procedure in place that will determine what variable to call depending on the location of where the MC is being called.
yeah, i suppose using a variable like that would work. it would just be sort of unnecessary becuase you’d have to set up if statements, the variables, and still assign the variables the correct locations. it’s just easier to know the relative locations of your files and their relationships.
Creating engaging and entertaining content for designers and developers since 1998.