fla dupeMC Q
- Started
- Last post
- 2 Responses
- finnpimp
hiya,
ok, I'm duplicating a shitload of MC's (as in movieclips....hehe), and I need to give them all a unique script identifier, in the form of a variable.
for example, copy # 43 of the original item, "item", is named "item43" (as in "item" + i), but need to have a variable you can use in scripts, for example:
item43.id = 43
how do I do this? how do I address the duplicated item in the creation loop (the loop that dupes all the items)?
- finnpimp0
..and, just to clarify, dot syntax doesn't work with variables, like
"item" + i + ".id" or something similar...
- finnpimp0
haha, well spank my ass and call me charlie, I just came up with it. any fla gurus wanna hear? ok,
1) create variable, like 'currentItem'
2) currentItem = "item" + i
(while in the loop)3) eval(currentItem).id = i
works exactly how I wanted. thanks for the help finn! :)