# Dynamically created movies - clickable?

**URL:** <https://forum.kirupa.com/t/dynamically-created-movies-clickable/181758>\
**Category:** flash\
**Created:** [March 12, 2006, 8:26pm UTC](https://forum.kirupa.com/t/dynamically-created-movies-clickable/181758 "2006-03-12T20:26:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kodzoman](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kodzoman/32/2241_2.png) [@kodzoman](https://forum.kirupa.com/u/kodzoman)\
**Post date:** [March 12, 2006, 8:26pm UTC](https://forum.kirupa.com/t/dynamically-created-movies-clickable/181758/1 "2006-03-12T20:26:11Z")

</div>

Hy, I created a dynamically creating moving balls using Snow 3.0 tutorial.

The creation of the balls goes like this:

```auto
    for (i=0; i<snowflakes; i++) {
        t = attachMovie("snow", "snow"+i, i);
...

```

I tried adding an onRelease function to each of this snowflakes. This works, but i can’t get the right “i” out. This makes me a lot of trouble since I want to show some images,… when user clicks on the ball. Why doesn’t this:

```auto
    t.onRelease = function(){
            _level0.atext.text = "test"+i;
            this._alpha = 10;
        }

```

return “i” for each snowflake to me. Instead it returns me the last i (being equal to “snowflakes”).

I am new to flash, so i might be missing something in the idea 🙂
