Importing an image in turing-animation
Author |
Message |
Grapefruit
|
Posted: 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

|
|
 |
Grapefruit
|
Posted: Mon Jan 14, 2013 8:59 pm Post subject: Re: Importing an image in turing-animation |
|
|
PLEASE HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPP |
|
|
|
|
 |
Panphobia

|
Posted: Mon Jan 14, 2013 9:54 pm Post subject: RE:Importing an image in turing-animation |
|
|
loop up cls and View.Update |
|
|
|
|
 |
Zren

|
Posted: 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
|
Posted: 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
|
Posted: 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. |
|
|
|
|
 |
|
|