Packageaway3d.materials
Classpublic class VideoMaterial
InheritanceVideoMaterial Inheritance BitmapMaterial Inheritance DefaultMaterialBase Inheritance MaterialBase

Public Properties
 PropertyDefined by
 Inheritedalpha : Number
The alpha of the surface.
BitmapMaterial
 Inheritedambient : Number
The strength of the ambient reflection.
DefaultMaterialBase
 InheritedambientColor : uint
The colour of the ambient reflection.
DefaultMaterialBase
 InheritedambientMethod : BasicAmbientMethod
The method to perform diffuse shading.
DefaultMaterialBase
  autoPlay : Boolean
VideoMaterial
  autoUpdate : Boolean
VideoMaterial
 InheritedbitmapData : BitmapData
The BitmapData object to use as the texture.
BitmapMaterial
 InheritedblendMode : String
The blend mode to use when drawing this renderable.
MaterialBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialBase
 InheritedcolorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with.
DefaultMaterialBase
 InheriteddiffuseMethod : BasicDiffuseMethod
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedextra : Object
An object to contain any extra data
MaterialBase
 Inheritedgloss : Number
The sharpness of the specular highlight.
DefaultMaterialBase
 Inheritedlights : Array
MaterialBase
 InheritedmaterialNamespace : String
The namespace of the material, used by the MaterialLibrary.
MaterialBase
  materialSize : int
VideoMaterial
 Inheritedmipmap : Boolean
DefaultMaterialBase
 Inheritedname : String
The name of the material.
MaterialBase
 InheritednormalMap : BitmapData
The tangent space normal map to influence the direction of the surface for each texel.
DefaultMaterialBase
  player : IVideoPlayer
[read-only]
VideoMaterial
 Inheritedrepeat : Boolean
Indicates whether or not any used textures should be tiled.
MaterialBase
 InheritedrequiresBlending : Boolean
BitmapMaterial
 InheritedshadowMethod : ShadingMethodBase
The method to perform diffuse shading.
DefaultMaterialBase
 Inheritedsmooth : Boolean
Indicates whether or not any used textures should use smoothing.
MaterialBase
 Inheritedspecular : Number
The overall strength of the specular reflection.
DefaultMaterialBase
 InheritedspecularColor : uint
The colour of the specular reflection.
DefaultMaterialBase
 InheritedspecularMap : BitmapData
A specular map that defines the strength of specular reflections for each texel.
DefaultMaterialBase
 InheritedspecularMethod : BasicSpecularMethod
The method to perform specular shading.
DefaultMaterialBase
 Inheritedtransparent : Boolean
Indicate whether or not the BitmapData contains transparency.
BitmapMaterial
 InheriteduniqueId : uint
The unique id assigned to the material by the MaterialLibrary.
MaterialBase
Protected Properties
 PropertyDefined by
 Inherited_mipmap : Boolean
MaterialBase
 Inherited_numPasses : uint
MaterialBase
 Inherited_screenPass : DefaultScreenPass
DefaultMaterialBase
Public Methods
 MethodDefined by
  
VideoMaterial
(source:String, materialSize:int = 256, loop:Boolean = true, autoPlay:Boolean = false, player:IVideoPlayer = null)
VideoMaterial
 Inherited
DefaultMaterialBase
 Inherited
addMethodAt(method:ShadingMethodBase, index:int):void
DefaultMaterialBase
  
dispose(deep:Boolean):void
VideoMaterial
 Inherited
isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean
DefaultMaterialBase
 Inherited
DefaultMaterialBase
 Inherited
setNameAndSpace(name:String, materialNameSpace:String):void
Sets the materials name and namespace.
MaterialBase
  
update():void
Draws the video and updates the bitmap material If this function is not called the bitmap material will not update!
VideoMaterial
 Inherited
updateTexture():void
Triggers an update of the texture, to be used when the contents of the BitmapData has changed.
BitmapMaterial
  
validateMaterialSize(size:int):int
[static] Validates the size of the BitmapMaterial.
VideoMaterial
Protected Methods
 MethodDefined by
 Inherited
Adds a pass to the material
MaterialBase
 Inherited
clearPasses():void
Clears all passes in the material.
MaterialBase
Property detail
autoPlayproperty
autoPlay:Boolean  [read-write]Implementation
    public function get autoPlay():Boolean
    public function set autoPlay(value:Boolean):void
autoUpdateproperty 
autoUpdate:Boolean  [read-write]Implementation
    public function get autoUpdate():Boolean
    public function set autoUpdate(value:Boolean):void
materialSizeproperty 
materialSize:int  [read-write]Implementation
    public function get materialSize():int
    public function set materialSize(value:int):void
playerproperty 
player:IVideoPlayer  [read-only]Implementation
    public function get player():IVideoPlayer
Constructor detail
VideoMaterial()constructor
public function VideoMaterial(source:String, materialSize:int = 256, loop:Boolean = true, autoPlay:Boolean = false, player:IVideoPlayer = null)Parameters
source:String
 
materialSize:int (default = 256)
 
loop:Boolean (default = true)
 
autoPlay:Boolean (default = false)
 
player:IVideoPlayer (default = null)
Init Parameters
Method detail
dispose()method
public override function dispose(deep:Boolean):void Parameters
deep:Boolean
update()method 
public function update():void

Draws the video and updates the bitmap material If this function is not called the bitmap material will not update!

validateMaterialSize()method 
public static function validateMaterialSize(size:int):int

Validates the size of the BitmapMaterial. Supported size are 2, 4, 8, 16, 32, 64, 128, 512, 1024, 2048. Example: 145 would return 128.

Parameters
size:int

Returns
int — int A valid size.
Wiki link
Click to go to the wiki page for 'away3d.materials.VideoMaterial'

Code examples

Comments