Greetings community…
This might be so simple I kind of feel sorry to post it.
But, I just can’t bend my mind over it and tackle this with supreme powers
sad isn’t it…
heres the deal:
in a for loop i am passing 60 movieclips to the stage at runtime.
now after that I trigger a function that fires every second.
But inside that timer function, i can not trace what items are in my array
in other words, every second i want to trigger a movieclip inside the array.
(this will later destroy a random ipad or iphone processor :p)
heres my code:
var circle_array:Array;
var seconds_counter:uint = 0;
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, runSeconds);
function posClips()
{
for (i=0; i < 60; i++)
{
circle_array* = new _dot();//linkage in the library
circle_array*.alpha = 0;
circle_array*.x = 0 + (circle_array*.width + 1) *i
circle_array*.y = (stage.stageHeight/2)
addChild(circle_array*);
}
myTimer.start();
}
posClips();
function runSeconds(event:TimerEvent):void
{
seconds_counter++;
trace ("circle_array* = " + circle_array[seconds_counter]);
//can't find the array
}
In AS2 this job was done by now, but in AS3 i duno how to tackle this.
any pointer is welcome.
Thanks for your time! seasons greetings