Hi everyone,
I have a question about adding vars along with movieclips placed in array.
So, that’s an example:
var Balloons:Array = new Array();
//then I create some ballons
for (i=0; i<=10; i++) {
Balloons* = new BalloonAnimation;
//and add them to stage
BalloonPlace.addChild(Baollons*);
//along with Balloons I need to add the position where it should fly to
//so I make it this way
Balloons*.flyToY = int;
Balloons*.flyToY = 0;
Balloons*.flyToX = int;
Balloons*.flyToX = i*20;
//start the animation
Balloons*.gotoAndPlay(2);
}
So the question, is it right to add the variables this way?
And i have a problem, when stopping the animation (gotoAndStop(Ballons*.currentFrame)) all the variable are gone, so I got a lot of errors after stopping it
Thanks for any reply:emb: