Computer Science Canada

Movement before animation

Author:  Barda4 [ 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


: