سورس افکت چرخش لیبل در b4a

سورس افکت چرخش لیبل در b4a

 

werwerwe.gif

 

#Region  Project Attributes 
	#ApplicationLabel: B4A Example
	#VersionCode: 1
	#VersionName: 
	'SupportedOrientations possible values: unspecified, landscape or portrait.
	#SupportedOrientations: unspecified
	#CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.
	Dim timer1 As Timer
	Dim timer2 As Timer
	Dim timer3 As Timer
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.

	Private Label1 As Label
	Private Label2 As Label
	Private Label3 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
	'Do not forget to load the layout file created with the visual designer. For example:
	Activity.LoadLayout("Layout1")

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub timer1_tick
	Label1.Top =Label1.Top - 1
    If Label1.Top = -15%y Then
    Label1.Top = 101%y
    End If
End Sub

Sub timer2_tick
	Label2.Left =Label2.Left - 1
    If Label2.Left = -15%y Then
    Label2.Left = 101%y
    End If
End Sub

Sub timer3_tick
	Label3.Left =Label3.Left + 1
	If Label3.Left = 100%x Then
	Label3.Left = -65%x
	End If
End Sub

Sub Button1_Click
	timer1.Initialize("timer1",20)
    timer1.Enabled = True
	'
	timer2.Initialize("timer2",20)
    timer2.Enabled = True
	'
	timer3.Initialize("timer3",20)
    timer3.Enabled = True
End Sub

 

دیدگاهتان را بنویسید