02-24-2010, 09:11 PM
Try using a boolean variable which sets itself to true when the go button is clicked and to false when the stop button is clicked. Then use the boolean with a while loop to let the loop stop when the variable is false.
Be sure there's something that calls the method with the while loop in it, though. Otherwise, the object won't move whether it's true or not.
|