This content has been marked as final. Show 4 replies
you can't slow a for-loop and you can't slow a while-loop (without slowing your cpu). they are not appropriate to use for animation or anything that's supposed to be reveal the transition during the loop.
instead use setInterval() or onEnterFrame loops to update item_mc's _x property.
That's great - thanks kglad.
All I've got to do now is stop it!! :)
to stop a loop started using setInterval(), use clearInterval(). to stop a loop started using mc.onEnterFrame, use delete mc.onEnterFrame.
Yeah, I'm experimenting with an if statement inside the setInterval function to try and stop it. Seems to be working - however getting it to reverse back into position on rollOut is proving tricky AND it only moves the same menu item - regardless of which item you rollOver ... which is odd. I guess I'm not being specific enough in telling it which item to move, but I can't figure that out. Here's the code in full: