Packagesandy.materials
Classpublic class MovieMaterial
InheritanceMovieMaterial Inheritance BitmapMaterial Inheritance Material

Displays a MovieClip 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
  movie : Sprite
[read-only] Get the sprite used for the material.
MovieMaterial
 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
  
MovieMaterial(p_oMovie:Sprite, p_nUpdateMS:uint = 40, p_oAttr:MaterialAttributes = null, p_bRemoveTransparentBorder:Boolean = false, p_nHeight:Number = 0, p_nWidth:Number = 0)
Creates a new MovieMaterial.
MovieMaterial
 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.
MovieMaterial
  
stop():void
Call this method is case you would like to stop the automatic MovieMaterial texture update.
MovieMaterial
 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.
MovieMaterial
Property detail
movieproperty
movie:Sprite  [read-only]

Get the sprite used for the material.

Implementation
    public function get movie():Sprite
Constructor detail
MovieMaterial()constructor
public function MovieMaterial(p_oMovie:Sprite, p_nUpdateMS:uint = 40, p_oAttr:MaterialAttributes = null, p_bRemoveTransparentBorder:Boolean = false, p_nHeight:Number = 0, p_nWidth:Number = 0)

Creates a new MovieMaterial.

The MovieClip used for the material may contain animation.
It is converted to a bitmap to give it a perspective distortion.
To see the animation the bitmap has to be recreated from the MovieClip on a regular basis.

Parameters
p_oMovie:Sprite — The Movieclip to be shown by this material.
 
p_nUpdateMS:uint (default = 40) — The update interval.
 
p_oAttr:MaterialAttributes (default = null) — The material attributes.
 
p_bRemoveTransparentBorder:Boolean (default = false) — Remove the transparent border.
 
p_nHeight:Number (default = 0) — Desired width ( chunk the movieclip )
 
p_nWidth:Number (default = 0) — Desired height ( chunk the movieclip )

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 MovieMaterial::stop() method has been called

stop()method 
public function stop():void

Call this method is case you would like to stop the automatic MovieMaterial texture 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.