Playing Movies -- Blender 3D Game Engine



  
pageok

  
10.  Add a Python Controller:  Use Movie.py

Mirror selected:  Object Mode

Buttons Window menu >> Logic (F4)
Controllers
Add
Python
Script:  Movie.py




   
11.  Add a string Property named material to the Movie screen
  
Note:
Property must be named material.  Can't be named Fred or Material or anything else.  The python code looks for a Property attached to the Movie screen named material.

Add Property named material to the Movie screen
Buttons Window menu >> Logic (F4)
Add Property button
Type:  String
Name:  material
     Enter unique name you gave material




   
12.  Add a string Property named movie to the Movie screen
  
Note:
Property must be named movie.  Can't be named Fred or Movie or anything else.  The python code looks for a Property attached to the Movie screen named movie.

Note:
Movie must be in same folder as the blend.  If it is in a subfolder include path to subfolder.  In other words, if monster.avi is in in subfolder myMovies you would use:
\myMovies\monster.avi

Note:

Add Property named material to the Movie screen
Buttons Window menu >> Logic (F4)
Add Property button
Type:  String
Name:  movie
     Enter movie name


   
13.  Optional:  Add a Bool Property named loop to the Movie screen
  
Note:
Property must be named loop.  Can't be named Fred or Loop or anything else.  The python code looks for a Property attached to the Movie screen named loop.

Note:
loop = True
play movie over and over and over
loop = False
play movie once

Add Property named loop to the Movie screen
Buttons Window menu >> Logic (F4)
Add Property button
Type:  Bool
Name:  loop



   
  
pageok