Dynamically created movies - clickable?

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

The creation of the balls goes like this:

    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:

    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 :slight_smile: