|
-
Jan 25th, 2000, 11:43 PM
#1
Thread Starter
New Member
I am trying to move an Image with a timer. The timer's interval is set to 50 and it moves the image 5 pixels to the right. After a while of moving it something strange happens. Instead of it moving 5 to the right, 5 to the right, 5 to the right, etc. it moves 4 or 6 to the right. The the image's left property is sometimes 159 and 176 etc. This is a bit odd. Does anyone know what's going on and how to fix it? Thanx.
-
Jan 26th, 2000, 05:33 AM
#2
PowerPoster
Enclose code in the code tag which I cannot type otherwise it will think i'm writing code! If [ is <, then the code tag is <code>your code here</code>
-
Jan 26th, 2000, 12:00 PM
#3
Hyperactive Member
If you have globals check them against your local variables (if your not declaring). Post the code. It could be a couple of things like the initialization of your variable in a For statement which might waver between 0 + 1, or the timer beginning again when a for ending statement is reached.
-
Jan 26th, 2000, 12:15 PM
#4
Thread Starter
New Member
Private Sub Timer3_Timer()
MM 3
Label1 = Worm(0).Left + (Worm(0).Width - 1) 'to check the left property
If Timer1 = False Then Timer1 = True
If Worm(0).Left >= 0 Then
If fast = 0 Then
Worm(0).Move Worm(0).Left - 5
Else
Worm(0).Move Worm(0).Left - 15
End If
End If
End Sub
-
Jan 26th, 2000, 12:16 PM
#5
Thread Starter
New Member
how come my code here isn't formatted?
-
Jan 26th, 2000, 12:47 PM
#6
Thread Starter
New Member
I figured out how to fix it but I still don't know why that was happening.
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
|