Is there a way, in ActionScript 2, to set multiple properties for an exising movieclip in one command?
For example, is there a way to write something like this more succinctly?:
myMovieClip._x = 10;
myMovieClip._y = 10;
myMovieClip._alpha = 100;
myMovieClip._rotation = 0;
I'm thinking something like:
myMovieClip(some bit of code)(_x = 10, _y = 10, _alpha = 100, _rotation = 0);
I'd appreciate any advice.
Not really, since you would have to specifically assign each property separately at some point. You could create a function that you feed the object and the property values into, but that function would need to handle assigning the individual properties one at a time.
Ah, pity. I think I thought of it because I remembered seeing it done before, but now I realise that the context was different – it was a component and not a movieclip whose properties were being assigned.