# Setting values for movie clips in an array \[renamed\]

**URL:** <https://forum.kirupa.com/t/setting-values-for-movie-clips-in-an-array-renamed/291078>\
**Category:** flash\
**Created:** [June 24, 2009, 1:13pm UTC](https://forum.kirupa.com/t/setting-values-for-movie-clips-in-an-array-renamed/291078 "2009-06-24T13:13:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fellyx](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@fellyx](https://forum.kirupa.com/u/fellyx)\
**Post date:** [June 24, 2009, 1:13pm UTC](https://forum.kirupa.com/t/setting-values-for-movie-clips-in-an-array-renamed/291078/1 "2009-06-24T13:13:13Z")

</div>

Hi everyone,

I have a question about adding vars along with movieclips placed in array.  
So, that’s an example:

```php

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:
