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

Username:   Password: 
 RegisterRegister   
 Turing: controlling the movement of a picture
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kirbyeatu




PostPosted: Wed May 29, 2013 6:39 pm   Post subject: Turing: controlling the movement of a picture

Can someone explain how to make a picture you have put in your program, move?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here>


Describe what you have tried to solve this problem
<Answer Here>


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

Turing:


<Add your code here>



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




PostPosted: Wed May 29, 2013 6:41 pm   Post subject: RE:Turing: controlling the movement of a picture

What's your question?
kirbyeatu




PostPosted: Wed May 29, 2013 6:54 pm   Post subject: RE:Turing: controlling the movement of a picture

What i mean is, if i input a picture into my program using the "PicDraw" function, how do i make that image move. And by move, i mean how do i assign the arrow keys to move it?
Nathan4102




PostPosted: Wed May 29, 2013 7:12 pm   Post subject: RE:Turing: controlling the movement of a picture

In the turing docs (http://compsci.ca/holtsoft/doc/), look up:

Input.Keydown
Pic.Draw
cls
View.Set (offscreenonly section)
View.Update

The input.Keydown page should give you a good idea on how to use arrow keys to do things. Then, to animate the picture, follow this format:

loop
calculate new picture coords
draw picture
View.Update
cls
end loop

Let me know if you have more questions!
kirbyeatu




PostPosted: Wed May 29, 2013 7:17 pm   Post subject: RE:Turing: controlling the movement of a picture

Thank you so much. This is working!
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: