Hi FlashKit one and all.

Trying to create a random movement for fish MCs:

//----------------------

var deg2rad:Number = Math.PI / 180;
var speed:Number = 1;// set to speed you want
var numFish:Number = 4;

for (var i:int=1; i<=numFish; i++) {
main.swim["fish_"+i].addEventListener(Event.ENTER_FRAME, move_me(my_angle));

main.swim["fish_"+i].rotation = Math.random() * 360;
var my_angle:Number = main.swim["fish_"+i].rotation * deg2rad;
}

function move_me(e:Event, my_angle) {
for (var i:int=1; i<=numFish; i++) {
e.target.x -= speed * Math.cos(my_angle);
e.target.y -= speed * Math.sin(my_angle);
}
}

//----------------------

Problem I have is that they all move to the same angle (the last one created).

How do I pass the different "my_angle" values to the "move_me" function...?

Hopefully this is simple, and I've just missed something as I'm relatively new to AS3.

Thanks indeed!