ImageView1.Top = 17
ImageView1.Left = 28
Dim ImageView1Spot As Int
Dim ImageView2Spot As Int
Dim Spot1Taken As Boolean
Dim Spot2Taken As Boolean
ImageView1Spot = Rnd(1, 10)
ImageView2Spot = Rnd(1, 10)
'Spot 1
''''''''''''''''''''''''''
If ImageView1Spot = 1 Then
If Spot1Taken = False Then
ImageView1.Top = 30
ImageView1.Left = 0
Spot1Taken = True
Else
End If
End If
Location(0,0) = 0: Location(0,1) = 30 ' left and top
Location(1,0) = 40: Location(1,1) = 30
Location(2,0) = 80: Location(2,1) = 30
...
Location(29, 0) = 120: Location(29,1) = 150
For i = 0 To 29
Locs(i) = i
Next
For i = 0 To 29
j = Rnd(i, 30)
x = Locs(i)
Locs(i) = Locs(j)
Locs(j) = x
Next
For i = 0 to 29
ImgView1(i).Left = Location(Locs(i), 0)
ImgView1(i).Top = Location(Locs(i), 1)
Next
If Resolution = 480 x 320 Then
Location(0,0) = 0: Location(0,1) = 30 ' left and top
Location(1,0) = 40: Location(1,1) = 30
Location(2,0) = 80: Location(2,1) = 30
End If
If Resolution = 1280 x 800 Then
Location(0,0) = 0: Location(0,1) = 30 ' left and top
Location(1,0) = 40: Location(1,1) = 30
Location(2,0) = 80: Location(2,1) = 30
End If
Sub Globals
Dim imgKey00, imgKey01, imgKey02, imgKey03, imgKey04 As ImageView
Dim imgKey05, imgKey06, imgKey07, imgKey08, imgKey09 As ImageView
Dim Keys() As ImageView
End Sub
Sub Activity
Keys = Array As ImageView(imgKey00, imgKey01, imgKey02, imgKey03, imgKey04, _
imgKey05, imgKey06, imgKey07, imgKey08, imgKey09)
Sub Blue1Match_Click
If Answer2.Tag = "0" Then
If Answer1.Tag = "4" Then
YouGotItRight
ScoreAndProgress
Else
YouGotItWrong
End If
End If
End Sub