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

Username:   Password: 
 RegisterRegister   
 Animating Elmo, flickering problems.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Helldemon80




PostPosted: Sun Jan 11, 2009 4:07 pm   Post subject: Animating Elmo, flickering problems.

Alright, this is Elmo, he may not be that great artistically, but w/e. I am making him wave, so i make his right arm go up and down in a loop, to do this I increase the y1 of his right arm and decrease it. Now the problem is that when it goes up , it starts flickering and such, but when going down it is fine, also it leaves little red lines when the reach their points.. Please Help, thanks...also u will also realize that you cant hear the music, thats because u dont have the file on ur comp, and if u do...Wow..............BTW!..his legs aren't done..THANKS! Smile



code:


setscreen ("graphics:600;500")

process Elmossong
    loop
        Music.PlayFile ("sesamestreettheme.mp3")
    end loop
end Elmossong


process Elmo

    var x1, x2, y1, y2 : int
    x1 := 450
    x2 := 335
    y1 := 205
    y2 := 270

    loop
        for count : 1 .. 70

            y1 := y1 + 1
            %Head
            drawoval (300, 350, 96, 82, 16)
            drawfilloval (300, 350, 95, 80, 12)
            %First Eye
            drawfilloval (280, 400, 15, 16, 0)
            %Black part of first eye
            drawfilloval (280, 400, 8, 8, 16)
            %Second Eye
            drawfilloval (320, 400, 15, 16, 0)
            %Black part of second eye
            drawfilloval (320, 400, 8, 8, 16)
            %Nose
            drawfilloval (301, 370, 20, 20, 42)
            %Mouth
            drawfillarc (300, 332, 50, 50, 180, 0, 16)
            %Body
            drawfillbox (361, 275, 241, 245, 12)
            drawoval (300, 200, 71, 78, 16)
            drawfilloval (300, 200, 70, 80, 12)
            %Left arm
            Draw.ThickLine (250, 265, 150, 230, 40, 12)
            %Right arm..moves arm down
            Draw.ThickLine (450, y1, 335, 270, 40, 12)
            delay (50)
            Draw.ThickLine (450, y1, 335, 270, 40, 0)
            %Left Leg
            Draw.ThickLine (210, 50, 300, 150, 40, 12)
            drawfillarc (220, 30, 170, 90, 120, 140, 12)
            %Right Leg
            Draw.ThickLine (400, 200, 300, 150, 40, 12)
            %Moves right arm down
            if y1 = 275 then
                Draw.ThickLine (450, 275, 335, 270, 40, 12)
                for decreasing counte : 70 .. 1
                    y1 := y1 - 1
                    Draw.ThickLine (450, y1, 335, 270, 40, 12)
                    delay (50)
                    Draw.ThickLine (450, y1, 335, 270, 40, 0)
                    if y1 = 205 then
                        Draw.ThickLine (450, 205, 335, 270, 40, 12)
                    end if
                end for
            end if
        end for
    end loop

        %Left Leg
            Draw.ThickLine (210, 50, 300, 150, 40, 12)
            drawfillarc (220, 30, 170, 90, 120, 140, 12)

end Elmo


fork Elmo
fork Elmossong


Sponsor
Sponsor
Sponsor
sponsor
Parker




PostPosted: Tue Jan 13, 2009 8:29 am   Post subject: RE:Animating Elmo, flickering problems.

Try using View.Set("offscreenonly") then put View.Update after you put the images on the screen. For more information on offscreenonly press f9 for turing reference.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: