_root inside target

ive loaded a movie into another and postitioned it…
[AS]
_root.abc._x=“400”;
_root.abc._y=“200”;
_root.abc.loadMovie(“trig_sub.swf”);
[/AS]
but once it is loaded where ever i have used _root in the loaded movie (trig_sub.swf) it nolonger works
eg…
on a button i have
[AS]
on(rollOver){
_root.menu.stop();
}[/AS]

bnut this dosent work when it has been loaded into instance “abc” in the main movie…
wat do i have to use instead of root to point at an instance?

yup… you’ll need to fix the addressing. :-\

here’s a little trick http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.asp

ok…
heres i understand wat is being said…
in the main time line of the movie to be loaded (trig_sub.swf) i place: [AS] _global.myAppMain = this; [/AS]
and then everywhere i used [AS]_root[/AS] i just delete the _root and put myAppMain instead.?

have i got this right, because i cant get it working…

yes. you got it right… and it works. :-\

keep trying. or attach your files. :wink:

question…
if i have a dynamic textbox with the var name “bob”.
and i later state
[AS] myAppMain.bob=“hello”;[/AS]
this should work right>…

is “bob” the instance name of the TextField or you assigned “bob” to the variable of the TextField?

if it’s the variable… it should work.
if it’s the instance name… you use

myAppMain.bob.text = "hello";

=)

nah i have created a dynamic text box…made it non-selectable and insisde an MC with the instance name “menu” i have put
myAppMain.bob=“hello”;
and the varible name of the text box, under properties, is bob.
but it just turns up blank.
aslo in _root>menu>1-10 i have a button and i told it one mouse over to myAppMain=“goodbye?”;
neither of which have any affect…
y?

i menat to put myAppMain.bob=“goodbye?”;

well, obviously there’s a problem… could you attach the files? :stuck_out_tongue:

ijm not familer with that…
how would i do it…?

click here <a href=“newreply.php?s=&action=newreply&threadid=21919”><img alt=“you’ll be able to attach your files if you click here” src=“images/post_reply.gif” border=“0” width=“90” height=“25”></a>

sorr y i though he ment in flash…
i cant load them their too big put u can get them here…
http://144.136.39.3/flash/

any luck guys?

sorry, i can’t download the files… i got a gateway timeout. :-\

sorry about that guys…
alls better now…
http://144.136.39.3/flash

also useful (sometimes more so) is the “_parent” property.

_parent refers to the timeline that contains the timeline with the _parent reference.

ie mc1 contains mc2 which contains mc3
from mc3, _parent._parent._name would return “mc1”

you have to publish the swf to flash 6 version, not flash 5. :-\

otherwise you’ll need to use _parent, as david suggested. :wink:

yer i finally figure it out…
thx guys/…

no problem. :stuck_out_tongue: =)