Hey everyone
Ok this has always been on my mind and so finally deciding not to be lazy decided to give it a try. And thats animating objects using for loops.
Let me give you a run down of what exactly Im trying to accomplish. I have this blue ball movieclip in my library in which I use to attach to the main movie. Now when the movie loads, I have the following code:
code:
onLoad = function () {
_root.attachMovie("blue", "blue1", 0);
_root.blue1._x = 300;
_root.blue1._y = 100;
//
for (var i:Number = 0; i<10; i++) {
_root.blue1._x += 5;
}
};
Now the problem isnt the fact its not working , but the fact that it works the wrong way
Instead of animating the ball moving +5 on its x axis , its just plops it down the line as soon as the movieloads. So it gets there, but you dont see it happening.
Im just wondering how I would go about having it animate and if I would need to put some sort of delay. I know I could use a tween, but as this is for a game, the speed needs to be controlled
Anyways, thanks everyone




Reply With Quote