movie player... need help
Posted: Fri Jul 30, 2004 3:59 pm
im making a movie player and i have a button in it and i don tknow how to do gosub when you click on the button... please help. heres the code:
i hope you all can help 
Code: Select all
result = MessageRequester("DREMTH - MO0vie/Audi0 Player", " Welcome to DREMTH's MO0vie and Audi0 player."+Chr(10)+"Would you like to enter the DREMTH MO0vie/Audi0 Player?", #PB_MessageRequester_YesNo)
If result = 7
End
EndIf
If InitMovie() = 0
MessageRequester("Error", "Can't initialize MO0vie/Audi0 file", 0)
End
EndIf
open:
MovieName$ = OpenFileRequester("MO0vie/Audi0 Selecter", "", "Movie/Audio Files (*.avi;*.mpg;*.asf;*.mp3;*.wav)|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
If MovieHeight() > 0
OpenWindow(0, 100, 150, MovieWidth(), MovieHeight()+70, #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget , "DREMTH - MO0vie Player")
CreateGadgetList(WindowID(0))
ButtonGadget(1, MovieWidth()/2-25, MovieHeight()+10, 50, 30, "Open")
If MovieHeight() > 0
If CreateStatusBar(0, WindowID() )
AddStatusBarField(6000)
StatusBarText(0, 0, "Playing MO0vie:"+MovieName$, 0)
EndIf
EndIf
Else
OpenWindow(0, 100, 150, 500, 17, #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget , "DREMTH - Audi0 Player")
If MovieHeight() < 0
If CreateStatusBar(0, WindowID() )
AddStatusBarField(6000)
StatusBarText(0, 0, "Playing Audi0:"+MovieName$, 0)
EndIf
EndIf
EndIf
PlayMovie(0, WindowID())
Repeat
Until WaitWindowEvent() = #PB_EventCloseWindow
Else
MessageRequester("Error", "Cannot load the MO0vie/Audi0 file."+Chr(10)+"File may be corrupted or is an invalid Audi0/MO0vie file.", 0)
EndIf
EndIf
Return
