|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
small piece of code help please
Hi, I have to following snippet:
_root.MyMovie0._y -= 10; _root.MyMovie1._y -= 10; _root.MyMovie2._y -= 10; _root.MyMovie3._y -= 10; _root.MyMovie._y -= 10; I want to replace the "MyMovie"-values with an array. I did the following but it doesnt work. for (i=0; i<Descriptions_length; i++) { _root.this["MyMovie" + i]._y -= 10; ) Anyone an idea? cheers Patrick |
|
#2
|
|||
|
|||
|
If your movie instances are really in the root, try to do it in the more reliable two-step way:
for (i=0; i<Descriptions_length; i++) { newIns = eval("_root.MyMovie"+i); newIns._y -= 10; } or, after declaration of newIns variable in the root: var newIns = null;, do the following: for (i=0; i<Descriptions_length; i++) { _root.newIns = eval("MyMovie"+i); _root.newIns._y -= 10; } |
|
#3
|
|||
|
|||
|
Thanks!
I'll have a go at it ![]() Patrick |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > small piece of code help please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|