Hi there,
I’m having a really hard time with a loop for code (wich simply sets properties of an array of Btn on stage).
When I play my movie locally, I don’t have any problem.
But when I play it inside the browser, it shows up.
The problem is that the for loop get stuck just 1 iteration before the end. As it doesn’t finish the loop, the rest of the code doesn’t execute and my app don’t work. To add a little bit more confusiness, if I reload the page it does finish the loop… BUT, I must reload it almost like a double click (don’t let time to flash to show anything betweens to clicks or “reload”).
You can see it here: http://www.motionfeel.com/laya/swf/main.swf
And the loop code is this:
for (var i:uint = 0; i< numBtns; i++) {
var vBtn:* = listRefBtns*;
var positionInSpace = listPositions*[0];
var randomInstep = listPositions*[1];
vBtn.y = positionInSpace * SpaceV + (SpaceV * 0.5 * randomInstep);
if (vBtn.y > 1000) {
vBtn.y -= heightTotal;
}
vBtn.initY = vBtn.y;
vBtn.posRelative = positionInSpace;
vBtn.pctOff = randomInstep;
// TRACE TEXT
vTexte += (i + " / " + numBtns + " : " + vBtn.name + "
");
refParent.refGalaxy.refMain.tempTxt.text = vTexte;
}
Nothing really fancy I think, and I repeat it does work perfectly at runtime (local)
If anyone has got an idea of what it could be. I started looking at the Garbadge Colector but don’t see anything there.
Any help would be really apreciated!
Thank you,
seb.