PDA

View Full Version : AS Code Help



mlk
July 6th, 2003, 10:22 AM
okay here's my code


onClipEvent (enterFrame) {
for (z; z<4; z++) {
s[z]._x = _root.xpos+_root._xmouse/z;
s[z]._y = _root.ypos+_root._ymouse/z;
}
}


i know it's stupid but how do you turn the s[z] into something like s1 - s2 or s3 ???
i just want different movie clip names for each loop..

thanks :thumb: !

senocular
July 6th, 2003, 12:31 PM
this["s"+z]
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12082


and you might want to set z=1 (or 0) to start

for(z=1; ...

mlk
July 6th, 2003, 12:58 PM
thanks a lot, the z=1 was really what I forgot - you rock =)

mlk