Mar 3, 2003 #1 knuckle05 Programmer Dec 17, 2001 247 CA Hi All, I have a problem. I have 20 instances of my MC on 20 different layers. At some point I need to initialize the _x position of all of them back to 0. How can I do this?
Hi All, I have a problem. I have 20 instances of my MC on 20 different layers. At some point I need to initialize the _x position of all of them back to 0. How can I do this?
Mar 3, 2003 #2 oldnewbie Technical User Dec 6, 2000 9,142 CA If they're numbered named, e.g. clip1, clip2, clip3, etc... Then you could use a for loop: for(i=1;i<=20;i++){ _root["clip"+i]._x = 0; } Replace "clip" by the common part or your clips' instance names. Regards, Don't worry, if my reply is wrong, BillWatson will clean it up for me! Upvote 0 Downvote
If they're numbered named, e.g. clip1, clip2, clip3, etc... Then you could use a for loop: for(i=1;i<=20;i++){ _root["clip"+i]._x = 0; } Replace "clip" by the common part or your clips' instance names. Regards, Don't worry, if my reply is wrong, BillWatson will clean it up for me!
Mar 3, 2003 Thread starter #3 knuckle05 Programmer Dec 17, 2001 247 CA thanks, and where should I perform this script? Upvote 0 Downvote
Mar 3, 2003 Thread starter #4 knuckle05 Programmer Dec 17, 2001 247 CA excellent, it works! I suppose it will work from any arbitrary event. Thx Upvote 0 Downvote