Computer Science Canada Having Trouble moving circle up and down continuously |
| Author: | zunaed [ Mon Oct 20, 2008 10:34 pm ] |
| Post subject: | Having Trouble moving circle up and down continuously |
I'm trying to figure out how to make a circle move up and down, so far i have var inky:=135 loop if inky>35 then inky:=inky-1 elsif inky<35 then inky:=inky+1 end if Draw.FillOval (335, inky, 10, 10, brightcyan) Draw.FillBox (325, 135, 345, 125, brightcyan) end loop I knew how to do this two years ago but haven't used it since and now I cant seem to remember the logic behind how it works. Can someone plz help |
|
| Author: | gitoxa [ Mon Oct 20, 2008 10:41 pm ] |
| Post subject: | RE:Having Trouble moving circle up and down continuously |
I'd use a variable for whether or not the circle is currently moving up or down. (hint: 2 choices) |
|
| Author: | zunaed [ Mon Oct 20, 2008 10:47 pm ] |
| Post subject: | Re: Having Trouble moving circle up and down continuously |
YES! Just figured it out thanks for the help. |
|