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

Username:   Password: 
 RegisterRegister   
 Importing an image in turing-animation
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Grapefruit




PostPosted: Mon Jan 14, 2013 8:20 pm   Post subject: Importing an image in turing-animation

What is it you are trying to achieve?
I'm trying to import an image of santa so that is moves across the screen.


What is the problem you are having?
The santa isn't clearing after I import it, so it leaves a "trail" of santas


Describe what you have tried to solve this problem
I don't understand how to get rid of it, if someone could explain how to do that, that would be great.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


 %moving santa
var santa:int:=Pic.FileNew("santa.gif")
var santax1:int:=200
var santay1:int:=400

loop
%moving santa
    Pic.Draw(santa,santax1,santay1,picMerge)
    santax1:=santax1+10
    santay1:=santay1+1
   
    if santax1>550 then
        santax1:=-2100
    end if
end loop
     



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
Grapefruit




PostPosted: Mon Jan 14, 2013 8:59 pm   Post subject: Re: Importing an image in turing-animation

PLEASE HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
Panphobia




PostPosted: Mon Jan 14, 2013 9:54 pm   Post subject: RE:Importing an image in turing-animation

loop up cls and View.Update
Zren




PostPosted: Mon Jan 14, 2013 9:54 pm   Post subject: RE:Importing an image in turing-animation

cls will clear the screen by drawing the background colour that is set using one of the commands I can't remember. It will also move the cursor back to the top left as if you used locate(0,0).

You may alternatively use: Draw.FillBox(0, 0, maxx, maxy, black).
tristanbryce7




PostPosted: Tue Jan 15, 2013 5:05 pm   Post subject: Re: Importing an image in turing-animation

Yah, use cls, View.Update, and setscreen ("offscreenonly") and it should work
neuro.akn




PostPosted: Thu Jan 17, 2013 1:30 pm   Post subject: RE:Importing an image in turing-animation

Yes, the View.Set ("offscreenonly"), View.Set ("nooffscreenonly"), etc. should work.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: