Packagesandy.materials
Classpublic class VideoMaterial
InheritanceVideoMaterial Inheritance BitmapMaterial Inheritance Material

Displays a Flash video ( FLV ) on the faces of a 3D shape.

Based on the AS2 class VideoSkin made by kiroukou and zeusprod



Public Properties
 PropertyDefined by
 Inheritedattributes : MaterialAttributes
The attributes of this material.
Material
  DEFAULT_FILL_COLOR : uint = 0
[static] Default color used to draw the bitmapdata content with.
VideoMaterial
 Inheritedfilters : Array
The array of filters for this material.
Material
 Inheritedgraphics : Graphics
BitmapMaterial
 Inheritedid : Number
The unique id of this material
Material
 InheritedlightingEnable : Boolean = false
Specify is the material can receive light and apply the lightAttributes if specified.
Material
 Inheritedmap : Matrix
BitmapMaterial
 Inheritedmodified : Boolean
The modified state of this material.
Material
 Inheritedpolygon : Polygon
BitmapMaterial
 Inheritedprecision : uint = 0
Precision of the bitmap mapping.
BitmapMaterial
 Inheritedrepeat : Boolean
The repeat property (?).
Material
 Inheritedsmooth : Boolean = false
This property enable smooth bitmap rendering when set to true.
BitmapMaterial
 Inheritedtexture : BitmapData
The texture ( bitmap ) of this material
BitmapMaterial
 Inheritedtype : MaterialType
The material type of this material.
Material
 InheriteduseVertexNormal : Boolean = false
Specify if the material use the vertex normal information Default value is set to false.
Material
Protected Properties
 PropertyDefined by
 Inheritedmatrix : Matrix
BitmapMaterial
 Inheritedm_bModified : Boolean
Material
 Inheritedm_oCmf : ColorMatrixFilter
BitmapMaterial
 Inheritedm_oPoint : Point
BitmapMaterial
 Inheritedm_oPolygonMatrixMap : Dictionary
BitmapMaterial
 Inheritedm_orgTexture : BitmapData
BitmapMaterial
 Inheritedm_oTexture : BitmapData
BitmapMaterial
 Inheritedm_oType : MaterialType
Material
 Inherited_useLight : Boolean = false
Material
Public Methods
 MethodDefined by
  
VideoMaterial(p_oVideo:Video, p_nUpdateMS:uint = 40, p_oAttr:MaterialAttributes = null)
Creates a new VideoMaterial.
VideoMaterial
 Inherited
init(p_oPolygon:Polygon):void
Initiates this material.
BitmapMaterial
  
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders this material on the face it dresses.
VideoMaterial
  
setTransparency(p_nValue:Number):void
Changes the transparency of the texture.
VideoMaterial
  
start():void
Call this method when you want to start the material update.
VideoMaterial
  
stop():void
Call this method is case you would like to stop the automatic video material graphics update.
VideoMaterial
 Inherited
toString():String
BitmapMaterial
Protected Methods
 MethodDefined by
 Inherited
_createTextureMatrix(p_aUv:Array):Matrix
BitmapMaterial
 Inherited
_tesselatePolygon(p_aPoints:Array, p_aUv:Array):void
BitmapMaterial
 Inherited
renderRec(ta:Number, tb:Number, tc:Number, td:Number, tx:Number, ty:Number, ax:Number, ay:Number, az:Number, bx:Number, by:Number, bz:Number, cx:Number, cy:Number, cz:Number):void
BitmapMaterial
 Inherited
renderTriangle(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number, v0x:Number, v0y:Number, v1x:Number, v1y:Number, v2x:Number, v2y:Number):void
BitmapMaterial
Property detail
DEFAULT_FILL_COLORproperty
public static var DEFAULT_FILL_COLOR:uint = 0

Default color used to draw the bitmapdata content with. In case you need a specific color, change this value at your application initialization

Constructor detail
VideoMaterial()constructor
public function VideoMaterial(p_oVideo:Video, p_nUpdateMS:uint = 40, p_oAttr:MaterialAttributes = null)

Creates a new VideoMaterial.

The video is converted to a bitmap to give it a perspective distortion.
To see the animation, the bitmap has to be recreated from the video on a regular basis.

Parameters
p_oVideo:Video — The video to be shown by this material
 
p_nUpdateMS:uint (default = 40) — The update interval
 
p_oAttr:MaterialAttributes (default = null) — The material attributes
Method detail
renderPolygon()method
public override function renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void

Renders this material on the face it dresses.

Parameters
p_oScene:Scene3D — The current scene
 
p_oPolygon:Polygon — The face to be rendered
 
p_mcContainer:Sprite — The container to draw on
setTransparency()method 
public override function setTransparency(p_nValue:Number):void

Changes the transparency of the texture.

The passed value is the percentage of opacity.

Parameters
p_nValue:Number — A value between 0 and 1. (automatically constrained)
start()method 
public function start():void

Call this method when you want to start the material update. This is automatically called at the material creation so basically it is used only when the VideoMaterial::stop() method has been called

stop()method 
public function stop():void

Call this method is case you would like to stop the automatic video material graphics update.