|
-
Angkor-What?
_.root.VARIABLE._alpha = 10???????
Hi,
I'm trying to following:
i = 5;
_root."px"+(i-1).canvas._alpha = 50;
So what I want to do is call the movieclip canvas inside movieclip px4 on the root and set it's alpha to 50...
I've tried lots:
_root.eval("px"+(i-1)).canvas._alpha = 50;
but this looks for the variable stored in px4
_root.+("px"+(i-1))+.canvas._alpha = 50;
isn't allowed
_root.("px"+(i-1)).canvas._alpha = 50;
isn't allowed
What is the correct syntax to do this?
Cheers,
Gekke_Hollander
MX 2004 Pro - Oops I did it again!!!
SWF, it's a journey... not a destination
-
Random without a cause
So you're trying to dynamically call a target path right? The right way to do this i think is like this:
eval("_root.px"+variable).canvas._alpha = 50;
Hope this works and helps you out.
Greetz
Bart
-
Angkor-What?
thanx
While you were posting I finally found it:
eval("_root.px" + (name-1) + ".canvas")._alpha = 50;
Thanx mate,
Gekke_Hollander
MX 2004 Pro - Oops I did it again!!!
SWF, it's a journey... not a destination
-
Random without a cause
Ooops, nope, the canvas part also needs to be between the eval brackets i think, so it's like this:
eval("_root.px"+variable+".canvas)._alpha = 50;
Sorry 
Greetz
-
Random without a cause
Ok, sloth is my major sin i admit 
Greetz, succes
-
and array access [] will also be in handy.
Regards~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|