Private Sub CmdKeluar_Click()
Unload Me
End Sub
Private Sub CmdMulai_Click()
If TmrLanding = True Then
TmrRunning = False
TmrTakeOff = False
TmrCrusing = False
Else
TmrLanding = False
TmrRunning = True
TmrTakeOff = True
TmrCrusing = True
End If
TmrLanding.Interval = 50
TmrRunning.Interval = 50
TmrTakeOff.Interval = 50
TmrCrusing.Interval = 50
End Sub
Private Sub Command1_Click()
Timer1 = True
Timer1.Interval = 50
End Sub
Private Sub Timer1_Timer()
If try.Left >= 1000 Then
try.Left = try.Left - 30
End If
End Sub
Private Sub TmrLanding_Timer()
If Pesawat.Top <= 5000 Then
Pesawat.Left = Pesawat.Left + 30
Pesawat.Top = Pesawat.Top + 30
Else
TmrLanding = False
TmrRunning = True
End If
End Sub
Private Sub TmrRunning_Timer()
If Pesawat.Left <= 7500 Then
Pesawat.Left = Pesawat.Left + 9000
Else
TmrRunning = False
TmrTakeOff = True
End If
End Sub
Private Sub TmrTakeOff_Timer()
If Pesawat.Top >= 1000 Then
Pesawat.Left = Pesawat.Left + 100
Pesawat.Top = Pesawat.Top - 200
Else
TmrTakeOff = False
TmrCrusing = True
End If
End Sub
Private Sub TmrCrusing_Timer()
If Pesawat2.Left >= -1500 Then
Pesawat2.Left = Pesawat2.Left - 500
Else
TmrCrusing = False
End If
End Sub
* disini gambarnya adalah pesawat, maka shapenya diganti dengan pesawat. dan timer 1,2,3 dan 4 di ganti dengan . landing, running,take of, crusing. untuk lebih jelasnya download
0 komentar:
Posting Komentar