'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
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 ImageView1 As ImageView
Dim Animation1() As String
Animation1 = Array As String ("00","01", "02", "03", "04", "05", "06", "07", "08", "09", "10","11", "12", "13", "14", "15", "16", "17", "18", "19", "20","21", "22", "23", "24", "25", "26", "27", "28", "29", "30","31", "32", "33", "34", "35", "36", "37", "38", "39", "40","41", "42", "43", "44", "45", "46", "47", "48", "49", "50","51", "52", "53", "54", "55", "56", "57", "58", "59", "60")
Dim Animation1MAX As String
Animation1MAX = 40
Dim Animation1Velocity As String
Animation1Velocity = 40 ' milli seconds
Dim Animation1Start As String
Animation1Start = 0
Dim TimerMario1 As Timer
Dim ImageView2 As ImageView
Dim Animation2() As String
Animation2 = Array As String ("00","01", "02", "03", "04", "05", "06", "07", "08", "09", "10","11", "12", "13", "14", "15", "16", "17", "18", "19", "20","21", "22", "23", "24", "25", "26", "27", "28", "29", "30","31", "32", "33", "34", "35", "36", "37", "38", "39", "40","41", "42", "43", "44", "45", "46", "47", "48", "49", "50","51", "52", "53", "54", "55", "56", "57", "58", "59", "60")
Dim Animation2MAX As String
Animation2MAX = 19
Dim Animation2Velocity As String
Animation2Velocity = 40 ' milli seconds
Dim Animation2Start As String
Animation2Start = 0
Dim TimerMario2 As Timer
Dim www As Label
Dim loading As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
Activity.LoadLayout("introneoart2")
loading.Text = "Loading..."
TimerMario1.Initialize("TimerMario1", Animation1Velocity) 'show it in 1 sec
TimerMario1.Enabled = True
End If
TimerMario2.Initialize("TimerMario2", Animation2Velocity) 'show it in 1 sec
TimerMario2.Enabled = True
End Sub
Sub TimerMario1_Tick
If Animation1Start <= Animation1MAX Then
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "intro-"&Animation1(Animation1Start)&".png")
Animation1Start = Animation1Start + 1
TimerMario1.Initialize("TimerMario2", Animation2Velocity) 'show it in 1 sec
TimerMario1.Enabled = True ' Again?
Else If Animation1Start > Animation1MAX Then
loading.Text = "Ready - Tap to start"
'Animation1Start = 1 ' This is for LOOP
TimerMario1.Initialize("TimerMario2", Animation2Velocity) 'show it in 1 sec
TimerMario1.Enabled = False ' STOP
End If
End Sub
Sub TimerMario2_Tick
If Animation2Start <= Animation2MAX Then
ImageView2.Bitmap = LoadBitmap(File.DirAssets, "anim-"&Animation2(Animation2Start)&".png")
Animation2Start = Animation2Start + 1
TimerMario2.Initialize("TimerMario2", Animation2Velocity) 'show it in 1 sec
TimerMario2.Enabled = True ' Again?
Else If Animation2Start > Animation2MAX Then
loading.Text = "Ready - Tap to start"
TimerMario2.Initialize("TimerMario2", Animation2Velocity) 'show it in 1 sec
Animation2Start = 0 ' This is for LOOP
'TimerMario1.Enabled = False ' STOP
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
loading.Text = "Start!"
End Sub