Computer Science Canada

animation helllllp NEEDED!!!!

Author:  rose1997 [ Mon May 25, 2009 8:58 am ]
Post subject:  animation helllllp NEEDED!!!!

What is it you are trying to achieve?

I want to build a character that moves horizontally across the page. How can i make gif. file move in turing.

What is the problem you are having?
Sad I DONT KNOW WHAT TO DO??????


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>

Author:  tjmoore1993 [ Mon May 25, 2009 1:13 pm ]
Post subject:  RE:animation helllllp NEEDED!!!!

Turing:

    loop
        View.Update
        Input.KeyDown (Pushed)
        if Pushed (KEY_RIGHT_ARROW) then
            loop
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_RIGHT_ARROW) not= true
                %Background Update
                %FRAME 1
                View.Update
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_RIGHT_ARROW) not= true
                %Background Update
                %FRAME 2
                View.Update
                exit
            end loop
        end if
        if Pushed (KEY_LEFT_ARROW) then
            loop
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_LEFT_ARROW) not= true
                %Background Update
                %FRAME 1
                View.Update
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_LEFT_ARROW) not= true
                %Background Update
                %FRAME 2
                View.Update
                exit
            end loop
        end if
    end loop

Author:  Kharybdis [ Tue May 26, 2009 7:43 am ]
Post subject:  RE:animation helllllp NEEDED!!!!

You can't use a .gif file in turing.
What you have to do is get still images of the gif in different stages of its motion (sprites), and then just follow tjmoore's code.

Author:  Dusk Eagle [ Tue May 26, 2009 7:46 am ]
Post subject:  Re: animation helllllp NEEDED!!!!

You actually can use gifs in Turing, using Pic.FileNewFrames and Pic.DrawFrames, but I don't recommend it.

Author:  Kharybdis [ Tue May 26, 2009 7:54 am ]
Post subject:  RE:animation helllllp NEEDED!!!!

Dusk Eagle, you really like correcting me, don't you ... ^^ and yet you're always right.

well played...

and rose, better not use gif's at all. it takes away from the learning experience...

Author:  Dusk Eagle [ Tue May 26, 2009 2:49 pm ]
Post subject:  Re: RE:animation helllllp NEEDED!!!!

Kharybdis @ Tue May 26, 2009 8:54 am wrote:
Dusk Eagle, you really like correcting me, don't you ...

Am I? I'm not trying to pick on you or anything Wink.

Author:  BigBear [ Tue May 26, 2009 4:12 pm ]
Post subject:  RE:animation helllllp NEEDED!!!!

Use the turing documentation for Pic.FileNewFrames and Pic.DrawFrames

the problem is it doesn't work well with many gif files

http://compsci.ca/v3/viewtopic.php?t=4637&highlight=gif

Author:  rose1997 [ Tue May 26, 2009 4:42 pm ]
Post subject:  RE:animation helllllp NEEDED!!!!

hey guys. thankx for the help. it really helped me alot.


: