pouvez vous m'aider pour ma barre de progression SVP?
Code : Tout sélectionner
InitMovie()
a=0
b=0
x=0
vol = 50
OpenWindow(0,100,100,220,130,"Serial_Media",#PB_Window_MinimizeGadget)
CreateGadgetList(WindowID(0))
ButtonGadget(0,10,40,60,20,"Open")
ButtonGadget(1,10,10,60,20,"Play")
ButtonGadget(2,80,10,60,20,"Pause")
ButtonGadget(3,150,10,60,20,"Stop")
TextGadget(4,10,70,200,50,"",#PB_Text_Border)
TrackBarGadget(5,80,50,130,20,0,100)
TextGadget(6,115,35,100,15,"Volume: " + Str(vol) + "%")
SetGadgetColor(4,#PB_Gadget_BackColor, $000000)
SetGadgetColor(4,#PB_Gadget_FrontColor, $00FF00)
SetGadgetState(5,vol)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case 0
multiname$ = OpenFileRequester("Fichier Multimedia","","All Files|*.*",0)
If multiname$
If x <> 0 And a=0
StopMovie(x-1)
ElseIf x <> 0 And a=1
ResumeMovie(x-1)
StopMovie(x-1)
EndIf
LoadMovie(x,multiname$)
name$ = multiname$
Repeat
If FindString(name$,"\",0)
start = FindString(name$,"\",0) +1
name$ = Mid(name$,start, Len(name$))
b=0
Else
b=1
EndIf
Until b=1
SetGadgetText(4, name$)
x=x+1
EndIf
Case 1
If a=1 And x <> 0
ResumeMovie(x-1)
ElseIf x <> 0
PlayMovie(x-1,0)
EndIf
Case 2
If x <> 0
PauseMovie(x-1)
a=1
EndIf
Case 3
If x <> 0
StopMovie(x-1)
a=0
EndIf
Case 5
vol = GetGadgetState(5)
SetGadgetText(6, "Volume: " + Str(vol) + "%")
EndSelect
EndSelect
If x <> 0
MovieAudio(x-1, vol, 0)
EndIf
Until event = #PB_Event_CloseWindow