[FMX]Set properties of Dup clips

Hello,

I have seen several different ways of contolling or referencing duplicated clips

one example I know

[AS] setProperty (eval ("_root.bar" + i), _rotation, i);[/AS]

What are some others? And if somone was feeling really kind I would love to see it written as a function. I am trying to expand my code abilities :slight_smile: Any thoughts on the best way?

Thanks,
Tobias

I prefer _root[“bar”+i] you don’t need the “eval”…just a preference as far as I know.

setProperty (_root[“bar”+i], _rotation, i);

Adam

with any of the 2 ways u can set any property

Why are you using the Flash 4 setProperty :h: :wink:

_root[“bar”+i]._rotation = i;

Dot Syntax is where it’s at now :slight_smile:

Also I tend to like to make things easier on myself by assigning the duplicated clip an ID (store it in a variable). An example of that would go someting like this…

[AS]newClip = bar.duplicateMovieClip(“bar”+i, i);
newClip._rotation = i;[/AS]