Here is a video of the result:
And here is the code:
And one more think I want evry time i click Command1 the animation repeat again and again and again.
Private Sub Command1_Click()
Timer1.Enabled = True '~~~> Enable the timer
Timer1.Interval = 10 '~~~> Speed
Private Sub Timer1_Timer()
If Picture2.Left < (Picture1.Left - Picture1.Width - 150) Then
Picture2.Left = Picture2.Left + 100
'// when it reaches the enemy, attack
Timer1.Interval = 100
num = num + 1
Picture2.Picture = imgfire2(num)
If num = 22 Then
Timer1.Enabled = False
Picture2.Left = 360
Picture2.Picture = Image2.Picture
But have problem when click one time evrythink perfect ot the second one don't work where can be the problem.
P.P:To resolve this problem just add num = 0 after Timer1.Enabled = False.
P.P2:akhileshbc If you can make the naruto sprite of the video move in the real way please post the code ofcourse use the above code please.
Thanks to all who help.