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

Username:   Password: 
 RegisterRegister   
 Movement before animation
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Barda4




PostPosted: Wed Feb 06, 2008 3:12 pm   Post subject: Movement before animation

Hi! I'm having a problem with the movement of my character and my animation. The problem is, when I press on any of the arrow keys the picturebox moves before the animation starts. If you have any suggestions they would be greatly appreated!! The code is in a sub routine that is called when I press the up arrow. The movement for the rest of the arrows is ecatly the same except for the pictures.

code:

If mover = False And Y > 0 Then
            LinkWalk.Size = New Point(21, 24)
            i += 1
            If i >= 5 Then
                Y -= 2
            End If
            If i <= 1 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp1
            ElseIf i > 5 And i <= 9 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp2
            ElseIf i = 13 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp3
            ElseIf i > 17 And i <= 21 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp4
            ElseIf i > 25 And i <= 29 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp5
            ElseIf i > 33 And i <= 37 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp6
            ElseIf i > 41 And i <= 45 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp7
            ElseIf i > 49 And i <= 53 Then
                LinkWalk.BackgroundImage = My.Resources.LinkUp8
            ElseIf i > 57 Then
                i = 0
            End If
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: