Computer Science Canada how to move ball diagonally |
Author: | rcmp1234 [ Tue Apr 08, 2008 6:27 pm ] | ||
Post subject: | how to move ball diagonally | ||
Hey guys, im trying to write a program. It is a simple program but I'm a newbie in Turing. Anyways, I am supposed to draw an oval at the bottom left of the window. it is supposed to move from the bottom to the top then back down. Once it gets to the bottom it has to move diagonally to the top right corner of the window. Then, it has to drop vretically to the bottom of the window again (top right corner) I'm not sure how to move it diagonally...but heres what I got so far...please help Thanks ![]()
|
Author: | BigBear [ Tue Apr 08, 2008 6:52 pm ] | ||||||
Post subject: | Re: how to move ball diagonally | ||||||
This is good I am guessing you are asking how do I put the circle in the top. Well you have the idea to move diagonaly you can easily change the size of the run window. By adding this to the beggining of the code.
Also to remove the flashing o the circle adding offscreenonly to that same line
And adding View.Update after you drawoval
|
Author: | Nick [ Tue Apr 08, 2008 6:56 pm ] |
Post subject: | RE:how to move ball diagonally |
rcmp, you wouldn't happen to have Mr. Holmes as a teacher, I had the exact same assignment last year :S |
Author: | rcmp1234 [ Tue Apr 08, 2008 6:57 pm ] |
Post subject: | RE:how to move ball diagonally |
Thanks Big Bear, that did the trick! and no, nick my teacher is not Mr. Holmes...lol |
Author: | Nick [ Tue Apr 08, 2008 7:00 pm ] |
Post subject: | RE:how to move ball diagonally |
an assignment as weird as that would be given out by anyone other than him, guess I was wrong |
Author: | BigBear [ Tue Apr 08, 2008 7:05 pm ] |
Post subject: | Re: how to move ball diagonally |
Or this teacher has changed his identity. eh Nick it is a possibility? ![]() |
Author: | Nick [ Tue Apr 08, 2008 7:16 pm ] |
Post subject: | RE:how to move ball diagonally |
no I got the same teacher this year |
Author: | BigBear [ Tue Apr 08, 2008 7:19 pm ] |
Post subject: | Re: how to move ball diagonally |
Umm ok but I meant because you changed your identity to protect your nemesis from finding you. |
Author: | A.J [ Tue Apr 08, 2008 10:43 pm ] | ||
Post subject: | Re: how to move ball diagonally | ||
if u want to learn more about movement in particular directions, try looking at examples of programs that uses them, like this one:
|
: |