我想实现一个小人的行走
(用几幅图片的切换)
当按下a键时向左走,图片开始切换,可是过了半秒中后就不停的切换前两副图片了
Private Sub Pm_KeyPress(KeyAscii As Integer)
Dim a
If a = 0 Then
If KeyAscii = 97 Then
Im.Top = -720
Im.Left = 0
fangxiang = -720
Timer1.Interval = 100
End If
a = 1
End If
End Sub
Private Sub Timer1_Timer()
Im.Top = fangxiang
If Im.Left = -960 Then
Im.Left = 0
Else: Im.Left = Im.Left - 480
End If
End Sub
这里有编译好的程序