Just starting out? Need help? Post your questions and find answers here.
			
		
		
			- 
				
																			 stan
- User
  
- Posts: 29
- Joined: Tue Jun 10, 2003 2:46 pm
						
						
													
							
						
									
						Post
					
								by stan » 
			
			
			
			
			Hi,
The following code plays one movie once (it is intended to play a movie while an other program is loading) :
Code: Select all
InitMovie()
LoadMovie( 1, "output.avi")
UseMovie( 1 )
Height = MovieHeight()
Width = MovieWidth( )
hmm=#PB_Window_Invisible ; ******* Got it from PB *******
WindowID = OpenWindow(10, 0, 0, Width, Height, hmm | #PB_Window_ScreenCentered|#PB_Window_BorderLess, "" )
While WindowEvent( ) : Wend
If WindowID
  PlayMovie(1, WindowID)
  While MovieStatus() = 0 : Delay( 1 ) : Wend
  ShowWindow_(WindowID(),#SW_SHOW) ; ******* Got it from PB *******
  While MovieStatus() <> 0  : Wend
  CloseWindow(10)
  FreeMovie(1) 
EndIf
End
Would it be possible to include the movie in the exe ?
TIA.
Bests.
Stan.
 
		 
				
		
		 
	 
				
			
		
		
			- 
				
								Rings							
- Moderator
  
- Posts: 1435
- Joined: Sat Apr 26, 2003 1:11 am
						
						
						
			
													
							
						
									
						Post
					
								by Rings » 
			
			
			
			
			If CreateFile(1, "output.avi") 
UseFile(1) 
L1= ?ExitProc-?Inc 
WriteData(?Inc,L1) 
CloseFile(1) 
Goto BeginProgram 
Inc: 
IncludeBinary "output.avi" 
ExitProc: 
EndIf 
BeginProgram:
InitMovie() 
LoadMovie( 1, "output.avi") 
UseMovie( 1 ) 
..
...
...
			
			
									
									SPAMINATOR NR.1
						 
		 
				
		
		 
	 
	
						
		
		
			- 
				
																			 stan
- User
  
- Posts: 29
- Joined: Tue Jun 10, 2003 2:46 pm
						
						
						
			
													
							
						
									
						Post
					
								by stan » 
			
			
			
			
			Hi Rings,
It works wonderfuly many thanks !!! ...
Bests.
Stan.
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			- 
				
																			 Fred
- Administrator
  
- Posts: 18351
- Joined: Fri May 17, 2002 4:39 pm
- Location: France
- 
				Contact:
				
			
						
						
						
			
													
							
						
									
						Post
					
								by Fred » 
			
			
			
			
			You should use DataSection/EndDataSection instead of Goto as the movie shouldn't be located in the code section:
Code: Select all
If CreateFile(1, "output.avi") 
  UseFile(1) 
  L1= ?ExitProc-?Inc 
  WriteData(?Inc,L1) 
  CloseFile(1) 
  DataSection
    Inc: 
      IncludeBinary "output.avi" 
    ExitProc: 
  EndDataSection
EndIf
InitMovie() 
LoadMovie( 1, "output.avi") 
UseMovie( 1 ) 
...
 
		 
				
		
		 
	 
	
						
		
		
			- 
				
																			 stan
- User
  
- Posts: 29
- Joined: Tue Jun 10, 2003 2:46 pm
						
						
						
			
													
							
						
									
						Post
					
								by stan » 
			
			
			
			
			Hi Fred,
Thanks for the reply, I will use your way instead or Rings (even if it seemed it worked fine for me ...).
Bests.
Stan.
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			- 
				
																			 Fred
- Administrator
  
- Posts: 18351
- Joined: Fri May 17, 2002 4:39 pm
- Location: France
- 
				Contact:
				
			
						
						
						
			
													
							
						
									
						Post
					
								by Fred » 
			
			
			
			
			The Rings's solution works perfectly, no problem. I was just pointed out than data should be in the DataSection instead of being in the code.