Sub Process_Globals
Dim Timer1 As Timer 'The timer that controls the animation
End Sub
Sub Globals
Dim Label1 As Label
Dim Label2 As Label
Dim ListOfScrollingLabels As List 'List of scrolling labels
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
timer1.Initialize("Timer1", 20)
End If
ListOfScrollingLabels.Initialize
Label1.Initialize("") 'Not needed if the label is added with the designer
Label2.Initialize("")
Activity.AddView(Label1, 10dip, 10dip, 150dip, 100dip)
Activity.AddView(Label2, 10dip, 130dip, 200dip, 100dip)
ListOfScrollingLabels.Add( _
ScrollingLabels.StartScrolling(Label1, "This is a very very very long sentence."))
ListOfScrollingLabels.Add( _
ScrollingLabels.StartScrolling(Label2, "jskldfjlskdj fsldk fjskldfj lskdfj lkewj flewk fjwklef ."))
Timer1.Enabled = True 'Start the scrolling
End Sub
Sub Timer1_Tick
ScrollingLabels.TimerTick(ListOfScrollingLabels)
End Sub