I need to play several videos in the same window, one beside the other in rows, that is, a Video Selector.
One option will be the use of the ContainerGadget. I have been following a previous post in the forum: http://www.purebasic.fr/english/viewtop ... 13&t=39526
The problem is that I can create all ContainerGadgets... I can "hear" the Video but not see the video. Could someone give me an idea of what I am doing wrong?
Thanks in advance.
The code for the prototype is something like this:
Code: Select all
InitMovie()
hbox = GetSystemMetrics_(SM_CXSCREEN)
vbox = GetSystemMetrics_(SM_CYSCREEN)
mh=10:mv=20
margin=10:rows=2:cols=3
Dim wmdi.l(10)
;Loading videos
LoadMovie(0,"C:\temp\videos\vid1.wmv")
LoadMovie(1,"C:\temp\videos\vid1.wmv")
LoadMovie(2,"C:\temp\videos\vid1.wmv")
LoadMovie(3,"C:\temp\videos\vid1.wmv")
LoadMovie(4,"C:\temp\videos\vid1.wmv")
LoadMovie(5,"C:\temp\videos\vid1.wmv")
#Main = 0
If OpenWindow(#Main, 0, 0, hbox, vbox, "VideoSelector", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
For i=0 To 5
col=i%cols:fil=Int(i/cols)
video_width=MovieWidth(i):video_height=MovieHeight(i)
wmdi(i)=ContainerGadget(i,mh+(col*(video_width+margin)),mv+(fil*(video_height+margin)),video_width,video_height,#PB_Container_Raised)
CloseGadgetList()
Next i
For i=0 To 5
PlayMovie(i,wmdi(i))
MovieAudio(i,50,0)
Next i
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
Code: Select all
For i=0 To 5
col=i%cols:fil=Int(i/cols)
video_width=MovieWidth(i):video_height=MovieHeight(i)
PlayMovie(i,#Main)
ResizeMovie(i,mh+(col*(video_width+margin)),mv+(fil*(video_height+margin)),video_width,video_height)
MovieAudio(i,50,0)
Next i