|
-
Jun 8th, 2002, 11:11 AM
#1
Thread Starter
New Member
whats wrong with this code?
i have this code -
Option Explicit
Dim jump As Integer
Dim xPos As Integer
Private Sub MoveButton()
xPos = Int((3400) * Rnd) \ 480
img1.Left = 120 + xPos * 480
End Sub
Private Sub cmd1_Click()
Timer1.Interval = 400
Randomize
lblEnd.Caption = ""
End Sub
Private Sub Timer1_Timer()
Call MoveButton
jump = jump + 1
If jump = 20 Then Call endgame
End Sub
Private Sub endgame()
Timer1.Interval = 0
lblEnd = Label1(xPos).Caption
End Sub
It works the first time you click the cmd1 button, but after that, it doesnt stop anymore...anyone know what is wrong with it?
(i have 8 labels positioned with numbers 1 to 8 on them and wherever img1 lands on, that is the number that appears on another label)
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
|