Again, I know how to do this in Generator, but I am trying to learn MX syntax.
I have a button in _level15 setting a variable (panel). I have a button loading a jpg, through loadmove, into a target. The variable is the name of that target.
If I don’t use the variable, here is the code I use:
on (release) {
loadMovie("…/dodge/aarp1.jpg", _root._level40.panel1);
}
what I want to do, is replace panel1 with the variable named “panel” .
It very well could be, but I’m not understanding it. Lost tried to help last nite, but I wasn’t following him at all either…
I have several buttons which will each set a diff value for the variable “panel”…
then, when loading a jpg from a menu, that variable will “tell” the loadmovie which target to load into.
I have got it to work without the variable in the code (if I hard code the target), but I don’t know how to get the variable which was set by another swf, and use that as the target…
*Originally posted by reverendflash *
**but I don’t know how to get the variable which was set by another swf, and use that as the target…[/IMG] **
So your trying to use a variable that’s created in for example _level5 as your target, and your also trying to load the value of that variable in _root?
If so, try the following:
==Insert this into the other swf actions====
Rev = eval(“this”);// change ‘this’ into the specified target in the other swf
==Then just load that swf, and use levels to reference Rev for example===
Oh ok, i was confused in the beginning and i didn’t understand you though.
Edit: actually my solution assigned the variable Rev to what ahmed posted above but in a different way! eval(“myMovie”) is actually the same as _level40[“myMovie”]…
hehe… glad its solved now…
i think your way is correct too, but the _level#[variable] is a kinda used more… i guess… or atleast among those who i knows…
eval is deprecated
Creating engaging and entertaining content for designers and developers since 1998.