Well you could give objects a go. I don't know how it will work out, but its worth a try.
I have no idea how you create objects inside a .fla but im sure it can be done, you can use a class though.
Just make a new action script file, and put somthing like this.
Then save that file as bouncer, and put it in the same directory as your .fla.Code:class bouncer { private var width:Number private var height:Number private var xspeed:Number private var yspeed:Number private var x:Number private var y:Number public function bouncer(w, h, xCoord, yCoord, sx, sy) { width = w height = h x = xCoord y = yCoord xspeed = sx yspeed = sy } }
That basicly just creates an object when called, which just stores all the info you need for each pretend mc.
Then in your .fla, for each object you want, just do somthing like this.
then loop through all your objects and change the variables accordinly. Check for collision using the x and y positions along with the width and height.Code:bouncer1 = new bouncer(20, 20, 50, 100, 5, 3)
Hope that helps.
Ali




Reply With Quote