Hi, nice to meet u all.
I’m a newbie here, and I’m just start learning AS 3 a few days later.
Have a plenty of Question …
== in AS 2 ==
for(i=1;i<=100;i++)
{
duplicateMovieClip(“box”, “box”+i, i);
eval(“box”+i)._x=posx; // set to custom position x
eval(“box”+i)._y=posy; // set to custom position y
eval(“box”+i).idx=i;
}
for(i=1;i<=100;i++)
{
eval(“box”+i).onRelease=function()
{
trace(this.idx);
//other statement
}
}
So, basicly, I want to duplicate into a plenty MovieClip, give them a flag variable and give each of them a specific Click event Handler.
I’ve already success in duplicating them, setting their position,
but I’m stuck with giving them a variable, and give each of them a Click Handler.
- Am I must spend a hundred row to give each duplicate MovieClip a handler?
- Can the addListener and the ClickHandler method inside the loop?
- How I give the duplicateMovieClip a variable?
Anyone can help me?? I’m sorry if it’s a repost.
Thx …