View Single Post
Getting the best of me...
Old
AliceIsKickingMyButt
Guest
 
Status:
Posts: n/a
Default Getting the best of me... - 11-09-2006, 10:52 AM

Just wanted to know if anyone had done (page 199) Chapter 7: Repetition Exercise 8 (speed control). The just of it is placing a fan into a world and writing methods for each button on the fan for different speeds, you have to use nested ifs/whiles to make sure the blades continue to turn until the animation stops or the off button is clicked. I have been working on this for about a week now, I have all methods written and all events set to them so when they are clicked they run. I wrote a method I called fan.buttonClick to simulate the buttons actually being pressed. The only problem is the function I wrote to tell the ifs/whiles that they were true is getting the best of me, I have tried numerous types of functions but haven't found one yet that will work. Also now it seems that my off method isn't working, anyway to make something false so that the if/while statements will just stop everything when I click off? Any thoughts or suggestions on this would be much appreciated.
   
Reply With Quote