
P.S: j'espère que ca vous ira ecrit comme ça.

Code : Tout sélectionner
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
OpenWindow(0, 100, 150, MovieWidth(), MovieHeight()+50, #PB_Window_SystemMenu, "PureBasic - Movie")
ProgressBarGadget(2,0, MovieHeight()+10, MovieWidth(), 20 , 1, MovieLength())
PlayMovie(0, WindowID())
Repeat
Event = WaitWindowEvent()
If Event = #PB_EventGadget
GadgetID = EventGadgetID()
If GadgetID = 2
Cursor = GetGadgetState(2)
MovieSeek(Cursor)
EndIf
EndIf
Trame = MovieStatus()
SetGadgetState(2, Trame)
Until WaitWindowEvent() = #PB_EventCloseWindow
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf