
-----------------------------------
Grapefruit
Mon Jan 14, 2013 8:20 pm

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)




 %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


-----------------------------------
Grapefruit
Mon Jan 14, 2013 8:59 pm

Re: Importing an image in turing-animation
-----------------------------------
PLEASE HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

-----------------------------------
Panphobia
Mon Jan 14, 2013 9:54 pm

RE:Importing an image in turing-animation
-----------------------------------
loop up cls and View.Update

-----------------------------------
Zren
Mon Jan 14, 2013 9:54 pm

RE:Importing an image in turing-animation
-----------------------------------
[tdoc]cls[/tdoc] 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
Tue Jan 15, 2013 5:05 pm

Re: Importing an image in turing-animation
-----------------------------------
Yah, use cls, View.Update, and setscreen ("offscreenonly") and it should work

-----------------------------------
neuro.akn
Thu Jan 17, 2013 1:30 pm

RE:Importing an image in turing-animation
-----------------------------------
Yes, the View.Set ("offscreenonly"), View.Set ("nooffscreenonly"), etc. should work.
