Expand|Select|Wrap|Line Numbers
- Public Sub movement(ilane as integer, icount as integer, iwidth as integer)
- 'ilane = lane number, icount = number of controls in array, iwidth = width of control
- For i = 1 To icount
- 'i 1 is effectively just the index number of the img box that is behind img box i
- i1 = i
- If i1 < 0 Then
- i1 = icount
- End If
- 'check for a collision between the images, what it does is irrelevant, only the syntax is troublesome
- If imglane[ilane]([i1]).Left >= imglane[ilane]([i]).Left + iwidth Then
- imglane[ilane]([i]).Left = imglane[ilane]([i]).Left - 30
- End If
- imglane[ilane]([i]).Left = imglane[ilane]([i]).Left - Rnd * 10 + 1
- Next i
- For i = 0 To icount
- If imglane0([i]).Left <= 720 Then
- imglane0([i]).Left = 8280
- End If
- Next i
- End Sub