Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

initializing MC's

Status
Not open for further replies.

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?

 
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[&quot;clip&quot;+i]._x = 0;
}

Replace &quot;clip&quot; by the common part or your clips' instance names. Regards,

oldman3.gif


Don't worry, if my reply is wrong, BillWatson will clean it up for me!
 
thanks,

and where should I perform this script?
 
excellent, it works!

I suppose it will work from any arbitrary event. Thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top