Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim ri As Int
ri= Rnd (1,33)
Dim points As Int
points = 0
Dim counter1 As Int
counter1 = 0
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim mp3 As MediaPlayer
Dim img1 As ImageView
Dim img2 As ImageView
Dim lblpoints As Label
Dim lblpunti As Label
Dim timer1 As Timer
Dim timer2 As Timer
Dim timer3 As Timer
Dim timer4 As Timer
Dim timer5 As Timer
Dim timer6 As Timer
Dim timer7 As Timer
Dim timer10 As Timer
Dim img3 As ImageView
Dim img4 As ImageView
Dim btnstart As Button
Dim live As Int
live = 2
Dim lblcounter As Label
Dim img As ImageView
Dim lbllive As Label
Dim lbllive3 As Label
Dim pippo As Int
Dim lblsound As Label
Dim answ As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("tapsmiley")
mp.Initialize
mp2.Initialize
mp3.Initialize
img1.Visible = False
img2.Visible = False
img3.Visible = False
img4.Visible = False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnstart_Click
mp2.Load(File.DirAssets,"okmusic.mp3")
mp2.Play
mp2.Looping = True
points = 0
counter1=0
lblcounter.Text = counter1
lblpoints.Text = points
lbllive3.Text = 3
ri= Rnd (1,33)
img1.Bitmap=LoadBitmap(File.DirAssets,ri &".gif")
img1.Visible = True
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
mp2.Stop
answ = Msgbox2("SEI SICURO DI VOLER USCIRE?","AVVISO","SI","","NO",Null)
If answ = DialogResponse.NEGATIVE Then
mp2.Load(File.DirAssets,"okmusic.mp3")
mp2.Play
mp2.Looping = True
Return True
End If
End If
Activity.Finish
Return False
End Sub