Доброй ночи, не работает TrackBarGadget в movie проигрывателе:
Код:
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;*wmv|All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
ResizeMovie(0, 10, 40, MovieWidth(0)-20, MovieHeight(0)-50)
OpenWindow(0, 10, 10, MovieWidth(0), MovieHeight(0), "Movie",#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget)
ButtonGadget(1,10,5,30,30,">")
ButtonGadget(2,50,5,30,30,"||")
TrackBarGadget(3, 90, 5, WindowWidth(0)-150, 30, 0, 10000)
PlayMovie(0, WindowID(0))
Repeat
WaitWindowEvent=WaitWindowEvent()
If WaitWindowEvent=#PB_Event_Gadget
If EventGadget()=1:ResumeMovie(0):EndIf
If EventGadget()=2:PauseMovie(0):EndIf
EndIf
If WindowWidth(0)<>WindowW Or WindowHeight(0)<>WindowH: ResizeMovie(0, 10, 40, WindowWidth(0)-20, WindowHeight(0)-50):EndIf
WindowW=WindowWidth(0)
WindowH=WindowHeight(0)
SetGadgetState(3,MovieStatus(0)*(10000/MovieLength(0)))
Until WaitWindowEvent = #PB_Event_CloseWindow
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIfПодскажите пожалуйста, что в коде не так?