Playmove does not work i only get a white window
PureBasic Version 5.51 (x32) is working, all versions higher than 5.51 will not work anymore
Code: Select all
InitMovie()
OpenWindow(0, 0, 0, 400, 300, "A screen in a window...", #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 170, 135, 45, 20, "Quit")
PanelGadget(1,5,5,390,290)
AddGadgetItem(1,-1,"2")
AddGadgetItem(1,0,"1")
CloseGadgetList()
LoadMovie(0,"test.wmv")
SetGadgetState(1,0)
Repeat
Event = WaitWindowEvent()
If Event=#PB_Event_Gadget
Num =GetGadgetState(1)
Result$ = GetGadgetItemText(1, Num,0)
If Result$ = "2"
If Movieflag = 0
PlayMovie(0,GetTopWindow_(GadgetID(1)))
ResizeMovie(0,0,(265-(MovieHeight(0)*384/MovieWidth(0)))/2,384,MovieHeight(0)*384/MovieWidth(0))
Else
ResumeMovie(0)
EndIf
ElseIf Result$ = "1"
If IsMovie(0)
PauseMovie(0)
Movieflag = 1
EndIf
EndIf
EndIf
Until Event = #PB_Event_CloseWindow