is there anyway t oshow 2 movies on the same window on the same time
Yes but you must understand what you are doing.
You must decide if you are going to display the movie on a window or on a directX screen. In your above code, you setup a DirectX screen but you tell it to draw the movie on the Window, and at the same time flipping directX screens. (giving you flicker)
If you are displaying movie on a Window, it would look like this:
Code: Select all
InitMovie()
If OpenWindow(0,0,0,640,240,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Screen 1")
LoadMovie(0,"vid1.mpg")
LoadMovie(1,"vid2.mpg")
UseMovie(0)
ResizeMovie(0,0,320,240)
UseMovie(1)
ResizeMovie(320,0,320,240)
PlayMovie(0,WindowID(0))
PlayMovie(1,WindowID(0))
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
If you want to display on a DirectX screen it would look like this:
Code: Select all
InitSprite()
InitMovie()
If OpenWindow(0,0,0,640,240,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Screen 1")
If OpenWindowedScreen(WindowID(0),0,0,640,240,0,0,0)
LoadMovie(0,"vid1.mpg")
LoadMovie(1,"vid2.mpg")
UseMovie(0)
ResizeMovie(0,0,320,240)
UseMovie(1)
ResizeMovie(320,0,320,240)
PlayMovie(0,ScreenID())
PlayMovie(1,ScreenID())
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
EndIf
Now, if you want to combine graphics/sprites with your movie, then you must render the movie to a sprite and display the sprite along with any other graphics and use FlipBuffers() to bring it into view.
Once again, it is best to read through the entire help file. You will learn lots!!!