Packagealternativa.engine3d.materials
Classpublic class MovieClipMaterial
InheritanceMovieClipMaterial Inheritance TextureMaterial Inheritance SurfaceMaterial Inheritance Material

The material which uses an instance of MovieClip as an interactive texture.

When using this material one should keep in mind that an ENTER_FRAME listener is added to the movie clip. If all references to the material have been lost, the listener will never be removed. Therefore after the material is no longer needed, the movieClip property has to be set to null in order to remove the ENTER_FRAME listener.



Public Properties
 PropertyDefined by
 Inheritedalpha : Number
material opacity
Material
 InheritedblendMode : String
Color blending mode.
Material
  clipRect : Rectangle
the area of the movie clip to draw on the material's texture.
MovieClipMaterial
  fillColor : uint
The material's texture is filled with this color before movie clip is rendered.
MovieClipMaterial
  matrix : Matrix
The transformation matrix which is applied to the movie clip.
MovieClipMaterial
  movieClip : MovieClip
The movie clip which is used as an interactive texture.
MovieClipMaterial
 Inheritedprecision : Number
Perspective correction precision rate.
TextureMaterial
  refreshRate : int
The material's texture refresh rate.
MovieClipMaterial
 Inheritedrepeat : Boolean
Texture repeat.
TextureMaterial
 Inheritedsmooth : Boolean
Texture smoothing while scaling.
TextureMaterial
 Inheritedsurface : Surface
Surface material.
SurfaceMaterial
 Inheritedtexture : Texture
Material texture.
TextureMaterial
 InheritedwireColor : uint
Wire line color.
TextureMaterial
 InheritedwireThickness : Number
Wire line thickness.
TextureMaterial
Public Methods
 MethodDefined by
  
MovieClipMaterial(movieClip:MovieClip, textureWidth:uint, textureHeight:uint, clipRect:Rectangle = null, matrix:Matrix = null, smooth:Boolean = false, precision:Number = 10, fillColor:uint = 0, refreshRate:int = 1)
Creates a new instance of the material.
MovieClipMaterial
  
Creates a clone of the material object.
MovieClipMaterial
Protected Methods
 MethodDefined by
 Inherited
markToChange():void
Marks a material as changed, sending a signal to the scene.
SurfaceMaterial
Property detail
clipRectproperty
clipRect:Rectangle  [read-write]

the area of the movie clip to draw on the material's texture. If the value of null have been specified, the the whole movie clip will be used.

Implementation
    public function get clipRect():Rectangle
    public function set clipRect(value:Rectangle):void
fillColorproperty 
public var fillColor:uint

The material's texture is filled with this color before movie clip is rendered.

matrixproperty 
matrix:Matrix  [read-write]

The transformation matrix which is applied to the movie clip. If the value of null have been specified, no transformation will be applied.

Implementation
    public function get matrix():Matrix
    public function set matrix(value:Matrix):void
movieClipproperty 
movieClip:MovieClip  [read-write]

The movie clip which is used as an interactive texture.Implementation
    public function get movieClip():MovieClip
    public function set movieClip(value:MovieClip):void

refreshRateproperty 
refreshRate:int  [read-write]

The material's texture refresh rate. The value of 1 tells material to refresh its texture every frame, 2 — every two frames and so on.

Implementation
    public function get refreshRate():int
    public function set refreshRate(value:int):void
Constructor detail
MovieClipMaterial()constructor
public function MovieClipMaterial(movieClip:MovieClip, textureWidth:uint, textureHeight:uint, clipRect:Rectangle = null, matrix:Matrix = null, smooth:Boolean = false, precision:Number = 10, fillColor:uint = 0, refreshRate:int = 1)

Creates a new instance of the material.

Parameters
movieClip:MovieClipthe movie clip which is used as an interactive texture
 
textureWidth:uintthe material's texture width
 
textureHeight:uintthe material's texture height
 
clipRect:Rectangle (default = null)the area of the movie clip to draw on the material's texture. If the value of null have been specified, the the whole movie clip will be used.
 
matrix:Matrix (default = null)the transformation matrix which is applied to the movie clip. If the value of null have been specified, no transformation will be applied.
 
smooth:Boolean (default = false)texture smoothing while scaling
 
precision:Number (default = 10)perspective correction precision rate
 
fillColor:uint (default = 0)the material's texture is filled with this color before movie clip is rendered
 
refreshRate:int (default = 1)the material's texture refresh rate. The value of 1 tells material to refresh its texture every frame, 2 — every two frames and so on.

See also

Method detail
clone()method
public override function clone():Material

Creates a clone of the material object.

Returns
Materiala clone of the material object