Aki.
01-28-2011, 03:35 PM
Hey guys,
I'm currently trying to move an object on the stage up and down. Right now, it is working fine and the object does as it's told, but whenever I press the key to initiate movement the object moves once, pauses and then continues.
I think in order to fix this and get a smoother motion, I need to let the event handler take care of the motion for me but I'm not sure how to go about it.
I'm guessing I need a function that contains the key presses and essentially acts like an on/off switch telling the event handler function when to turn on or off up or down movement.
Does this make any sense? Any ideas on how I could go about getting this to work?
I'm currently trying to move an object on the stage up and down. Right now, it is working fine and the object does as it's told, but whenever I press the key to initiate movement the object moves once, pauses and then continues.
I think in order to fix this and get a smoother motion, I need to let the event handler take care of the motion for me but I'm not sure how to go about it.
I'm guessing I need a function that contains the key presses and essentially acts like an on/off switch telling the event handler function when to turn on or off up or down movement.
Does this make any sense? Any ideas on how I could go about getting this to work?