|
-
Dec 24th, 2001, 09:02 PM
#1
Thread Starter
Addicted Member
How can i use the same code for another image?
i'm making a horse racing game and i have this:
Private Sub Timer1()
If intN = 1 Then
picman.Picture = Image1.Picture
picman.Left = picman.Left + 60
intN = 2
ElseIf intN = 2 Then
picman.Picture = Image2.Picture
picman.Left = picman.Left + 60
intN = 3
ElseIf intN = 3 Then
picman.Picture = Image3.Picture
picman.Left = picman.Left + 60
intN = 4
ElseIf intN = 4 Then
picman.Picture = Image4.Picture
picman.Left = picman.Left + 60
intN = 5
ElseIf intN = 5 Then
picman.Picture = Image5.Picture
picman.Left = picman.Left + 60
intN = 6
ElseIf intN = 6 Then
picman.Picture = Image6.Picture
picman.Left = picman.Left + 60
intN = 7
ElseIf intN = 7 Then
picman.Picture = Image7.Picture
picman.Left = picman.Left + 60
intN = 8
ElseIf intN = 8 Then
picman.Picture = Image8.Picture
intN = 1
End If
End Sub
now how can i use the same but for horse2?? without having to rename all to horse 2.. maybe control arrays ?? or how?? and please explain how to do it! thx in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|