Posted: Wed Jan 16, 2008 5:25 pm Post subject: Help on my project due in two days
I have a project and the main problem I am facing is dragging words and almost everything else. So can some explain to what i can do to finish this project, plz. It wil be so happy. The instructions for my project are:
You have been hired by the grade 5 English teacher to test a student's ability to put 5 words in alphabetical order. Five randoms words are displayed vertically on the left side of the screen with 5 empty vertical spaces on the right. The students selects each word and moves it to right side of the screen placing it correctly in order. If the words are in correct alphabetical order, a green LED flashes on a corresponding peripheral to indicate the entry is correct. If not, a red LED flashes.
THANKS AGAIN IF YOU HELP ME
Sponsor Sponsor
Gooie
Posted: Wed Jan 16, 2008 7:10 pm Post subject: Re: Help on my project due in two days
So what your saying is you want us to do the project for you?
*Pop Up*
You have performed an illegal operation.
firex2249
Posted: Wed Jan 16, 2008 7:16 pm Post subject: Re: Help on my project due in two days
No i should have been clear, i meant help me drag words. Srry for the trouble.Here is what i got so far:
put " Alphabetical Order Game"
put "List of words:"..
put " Words in alphabetical order:"
put ""
put "Noob"
put ""
put "ball"
put ""
put "keyboard"
put ""
put "book"
put ""
put "ruler"
Posted: Wed Jan 16, 2008 7:19 pm Post subject: Re: RE:Help on my project due in two days
Tony @ Wed Jan 16, 2008 7:16 pm wrote:
If the use of a mouse to drag things confuses you, you could choose to settle for keyboard input to finish the project.
Otherwise use Mouse.Where() to figure out where the pointer is, and change a target word's location to the same set of co-ordinates.
So can you explain to me where to use it cause I am beginner
syntax_error
Posted: Wed Jan 16, 2008 8:33 pm Post subject: Re: Help on my project due in two days
yes we can show you here find it on your own
magical
firex2249
Posted: Wed Jan 16, 2008 10:05 pm Post subject: Re: Help on my project due in two days
Well i didnt use the mouse where but settled for keyboard, so thx:
put " Alphabetical Order Game"
put "*To exit the game type:stop*"
put "List of words:"
put "a.noob"
put "b.ball"
put "c.keyboard"
put "d.book"
put "e.ruler"
loop
var word : string
put ""
put "Please put the words in orders(ex. a,b,c,d,e)"
get word
if word = "b,d,c,a,b" then
put "WEll DONE"
parallelput (1)
else
put "Invalid choice"
parallelput (2)
exit when word = "stop"
end if
end loop
StealthArcher
Posted: Wed Jan 16, 2008 10:07 pm Post subject: RE:Help on my project due in two days
Nice, now if you want, try to improve it to using the mouse, since you do have something to hand in, no stress.
Sponsor Sponsor
Zampano
Posted: Wed Jan 16, 2008 10:23 pm Post subject: Re: Help on my project due in two days
That would be an excellent entry, except for the typo that makes it faulty.The correct last word is 'e'.
If you want to do it with the mouse, then you should hold variables which represent the x and y locations of each word. Then, compare the location of the mouse to the location of each word, thus determining if the mouse is over the word. If it is, check if the mousebutton is down. That given, adjust the word location so that the mouse is about in the middle of it (the mouse can only move a bit each moment, so the word will continue to follow the mouse as long as the button is down and the location is within the bounds of the x and y of the word being carried.
To improve the program, you can use a value to hold information on whether or not the cursor currently has a word attached to it, so that you can make it ignore other words if one is currently being carried.
firex2249
Posted: Thu Jan 17, 2008 5:44 pm Post subject: Re: Help on my project due in two days
Zampano @ Wed Jan 16, 2008 10:23 pm wrote:
That would be an excellent entry, except for the typo that makes it faulty.The correct last word is 'e'.
If you want to do it with the mouse, then you should hold variables which represent the x and y locations of each word. Then, compare the location of the mouse to the location of each word, thus determining if the mouse is over the word. If it is, check if the mousebutton is down. That given, adjust the word location so that the mouse is about in the middle of it (the mouse can only move a bit each moment, so the word will continue to follow the mouse as long as the button is down and the location is within the bounds of the x and y of the word being carried.
To improve the program, you can use a value to hold information on whether or not the cursor currently has a word attached to it, so that you can make it ignore other words if one is currently being carried.
what do u mean by compare the location of the mouse to the location of each word?
is there code for that with mouse where and this what i did so far:
var x, y, button : int
loop
Mouse.Where (x, y, button)
locatexy (1, 300)
put "apple"
if button = 1 then
end if
end loop
Tony
Posted: Thu Jan 17, 2008 5:56 pm Post subject: RE:Help on my project due in two days
no, it's more like
Turing:
var x, y, button :int loop Mouse.Where(x, y, button) locatexy(x,y) put"apple" cls endloop