Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 flashing screen
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bahomit250




PostPosted: Wed Apr 19, 2006 12:45 pm   Post subject: flashing screen

i got a proablem with my program ewhen the characther moves the screen flash and the background erases then reappers but it makes it look terrible here the code
[/code]

setscreen ("graphics:max;max")

var trees := Pic.FileNew ("trees.bmp")
var birdy := Pic.FileNew ("birdy.bmp")
var x, y : int := 100
Pic.Draw (birdy, x, y, picXor)

Pic.Draw (trees, 25, 0, picCopy)
var chars : array char of boolean
Pic.Draw (birdy, x, y, picXor)
loop
Pic.Draw (trees, 25, 0, picCopy)
Pic.Draw (birdy, x, y, picXor)
Input.KeyDown (chars)
if chars (KEY_LEFT_ARROW) then
x := x - 10
Pic.Draw (birdy, x, y, picXor)

delay (20)
cls

Pic.Draw (birdy, x, y, picXor)
Input.KeyDown (chars)
end if
if chars (KEY_LEFT_ARROW) then
x := x
Pic.Draw (birdy, x, y, picXor)
delay (20)
cls

end if
Input.KeyDown (chars)
if chars (KEY_RIGHT_ARROW) then
x := x + 10
Pic.Draw (birdy, x, y, picXor)
delay (20)
cls

Input.KeyDown (chars)
end if
if chars (KEY_RIGHT_ARROW) then
x := x
Pic.Draw (birdy, x, y, picXor)
delay (20)
cls

end if

end loop



code:
if u can help please tell me
Sponsor
Sponsor
Sponsor
sponsor
codemage




PostPosted: Wed Apr 19, 2006 1:12 pm   Post subject: (No subject)

You'll be interested in
offscreenonly & View.Update

http://www.compsci.ca/v2/viewtopic.php?t=3077
bahomit250




PostPosted: Wed Apr 19, 2006 1:30 pm   Post subject: (No subject)

we only have turin 4.0.3
do_pete




PostPosted: Wed Apr 19, 2006 1:40 pm   Post subject: (No subject)

Then you'll have to try using cls as little as possible and draw everything in one chunk of code.
Andy




PostPosted: Wed Apr 19, 2006 1:55 pm   Post subject: (No subject)

view.update works fine with 4.03, even works with 4.01, just not 4.00 and before
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: