Need Help with drag command!
Author 
Message 
leu_raz

Posted: Wed Jan 07, 2004 11:19 am Post subject: Need Help with drag command! 


Hy i need help with the drag command.I have my ISP due in about one week and my project is that i am hired by a grade 1 teacher and i am to test the ability of kids to put 5 blocks in order from the smallest to the largest.My question is:How do you make the blocks move?But move not leaving tracks behind.???And my other question is how does the computer know when all the blocks are in the right order?That's it thank you very much if you cna help... 





Sponsor Sponsor



shorthair

Posted: Wed Jan 07, 2004 11:29 am Post subject: (No subject) 


WHAT TH EHELL ARE YOU DOING SPAMMING THIS FORUM ,WHY DO YOU NEED 2 IDENTICLE TOPICS , If this was a mistake then i can understand but if not this will not help get your question answered 





shorthair

Posted: Wed Jan 07, 2004 11:35 am Post subject: (No subject) 


i have a feeling you are doing the same project as marioman88 , il help help you both out on his topic , there is no need for 3 topics about the exact same thing 





icedesi

Posted: Wed Jan 07, 2004 7:10 pm Post subject: (No subject) 


Ez, when you make ur loops, create a box that is the color of the background, itll mask the trails.
Quote:
setscreen ('offscreenonly')
setscreen ('graphics:vga')
for x: 190..199
drawfillbox (x,195,x+25,206,red)
delay (400)
drawfillbox (x,195,x+25,206,white) % or Color of background
View.Update
end for
Aiite? k, Good! As for the other one, im thinkin. 





Skizzarz

Posted: Wed Jan 07, 2004 8:37 pm Post subject: (No subject) 


umm... do u mean kinda like when you move the mouse, the shape follows? cuz i can help u there....just reply fast...
oh yay 24 bits now! Almost 3 bytes! lol 





Skizzarz

Posted: Wed Jan 07, 2004 8:38 pm Post subject: (No subject) 


im so stupid... 24/8 IS 3.... duh and to think im in gr 11..... 





leu_raz

Posted: Thu Jan 08, 2004 4:46 pm Post subject: (No subject) 


Thanks for the help till now.It has been pretty efficient.To mask the trails i already knew that but here it doesn't work;(.This is my code till now:
%Declare Variables
var c := 10
var d := 10
var x, y, b : int
var e := 60
var f := 60
var answer : string
var g := 150
var h := 100
var i := 400
var j := 200
%Welcome Note
colorback (blue)
Text.Color (white)
put "" : 20, "Hello and welcome to THE TEST"
put " You must drag the boxes in their specified place."
put "The perfect score can be taken if you arrange the boxes..."
put "from the smallest to the largest"
put "Welcome to the test!You must put each box in it's predefined place."
put "If you want to continue input next."
put "If you wish to quit just say esc."
get answer
for p : 0 .. 1
if answer = "next" then
cls
colorback (101)
Text.Color (105)
put "" ..
put "Well put the boxes in the right order"
elsif answer = "esc" then
exit
end if
end for
%BOXES
drawbox (150, 30, 180, 60, black)
drawfillbox (10, 10, 50, 50, blue)
drawfillbox (60, 60, 120, 120, red)
drawfillbox (150, 100, 250, 200, black)
drawfillbox (400, 200, 440, 240, green)
loop
mousewhere (x, y, b)
if x >= c and x <= c + 40 and y >= d and y <= d + 40 and b = 1 then
drawfillbox (x, y, c + 40, d + 40, blue)
delay (10)
drawfillbox (x, y, c + 40, d + 40, 101)
c := x  20
d := y  20
elsif x >= e and x <= e + 60 and y >= f and y <= f + 60 and b = 1 then
drawfillbox (x, y, e + 60, f + 60, red)
delay (10)
drawfillbox (x, y, e + 60, f + 60, 101)
e := x  30
f := y  30
elsif x >= g and x <= g + 80 and y >= h and y <= h + 80 and b = 1 then
drawfillbox (x, y, g + 100, h + 100, black)
delay (10)
drawfillbox (x, y, g + 100, h + 100, 101)
g := x  50
h := y  50
elsif x >= i and x <= i + 40 and y >= j and y <= j + 40 and b = 1 then
drawfillbox (x, y, i + 40, j + 40, green)
delay (10)
drawfillbox (x, y, i + 40, j + 40, 101)
i := x  20
j := y  20
drawfillbox (x, y, c + 40, d + 40, blue)
drawfillbox (x, y, e + 60, f + 60, red)
drawfillbox (x, y, g + 100, h + 100, black)
drawfillbox (x, y, i + 40, j + 40, green)
end if
drawbox (150, 30, 180, 60, black)
drawfillbox (10, 10, 50, 50, blue)
drawfillbox (60, 60, 120, 120, red)
drawfillbox (150, 100, 250, 200, black)
drawfillbox (400, 200, 440, 240, green)
end loop
%Heeeeeellp 






