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
 Inheritedalpha : Number
Indicates the alpha transparency value of the material.
BitmapMaterial
 Inheritedattributes : MaterialAttributes
The attributes of this material.
Material
 Inheritedfilters : Array
The array of filters for this material.
Material
 Inheritedflags : uint
Contains specific material flags.
Material
 Inheritedid : Number
The unique id of this material.
Material
 InheritedlightingEnable : Boolean = false
Specifies if the material can receive light and have light attributes applied to it.
Material
 InheritedmaxRecurssionDepth : uint = 5
Maximum recurssion depth when using precision > 1 (which enables the perspective correction).
BitmapMaterial
 Inheritedmodified : Boolean
The modified state of this material.
Material
 Inheritedprecision : uint = 0
Precision of the bitmap mapping.
BitmapMaterial
 Inheritedrepeat : Boolean = true
The repeat property.
Material
 Inheritedsmooth : Boolean = false
This property enables 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.
Material
Public Methods
 MethodDefined by
  
VideoMaterial(p_oVideo:Video, p_nUpdateMS:uint = 40, p_oAttr:MaterialAttributes = null)
Creates a new VideoMaterial.
VideoMaterial
 Inherited
begin(p_oScene:Scene3D):void
Calls begin method of the MaterialAttributes associated with this material.
Material
 Inherited
finish(p_oScene:Scene3D):void
Calls finish method of the MaterialAttributes associated with this material.
Material
 Inherited
init(p_oPolygon:Polygon):void
BitmapMaterial
 Inherited
renderPolygon(p_oScene:Scene3D, p_oPolygon:Polygon, p_mcContainer:Sprite):void
Renders the polygon dress in this material.
Material
 Inherited
renderSprite(p_oSprite:Sprite2D, p_oMaterial:Material, p_oScene:Scene3D):void
Renders the sprite dress in this material.
Material
 Inherited
setTiling(p_nW:Number, p_nH:Number, p_nU:Number = 0, p_nV:Number = 0):void
Sets texture tiling and optional offset.
BitmapMaterial
 Inherited
setTransparency(p_nValue:Number):void
Changes the transparency of the texture.
BitmapMaterial
  
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
Returns a string representation of this object.
BitmapMaterial
 Inherited
unlink(p_oPolygon:Polygon):void
Calls unlink method of the MaterialAttributes associated with this material.
Material
Public Constants
 ConstantDefined by
  DEFAULT_FILL_COLOR : uint = 0
[static] Default color used to draw the bitmapdata content.
VideoMaterial
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.

See also

Method detail
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.

Constant detail
DEFAULT_FILL_COLORconstant
public static const DEFAULT_FILL_COLOR:uint = 0

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