views:

32

answers:

1

I have a movieclip created in the IDE exported to Actionscript via the Library panel (Linkage?).

I instatiate multiple instances of it via a loop on the timeline.

I want to move them around randomly via Actionscript. How do I do that? I tried using listeners, but I have no way to store values to make each movement unique.

(edited to be more clear)

+2  A: 

It’s a little unclear what you are trying to do, but here are a couple quick suggestions that might help:

You can code a class for your MovieClip. Create a .as class file with the same name as the Export class name in the IDE. In that class you can keep track of whatever values you need and create animation functions.

If that’s overkill for what you are trying to do, you can always just create properties on the MovieClips at runtime. MovieClips are dynamic, so you can just do:

myClipInstance.speed = 3;  
myClipInstance.direction = 45;

To store the values. You’d retrieve them the same way when you want to update the animation.

If you can clarify what you’re trying to achieve we might be able to help more.

Cadin
Thanks! I just used runtime properties.
john2x