| Package | alternativa.engine3d.materials |
| Class | public class MovieClipMaterial |
| Inheritance | MovieClipMaterial TextureMaterial SurfaceMaterial 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.
| Property | Defined by | ||
|---|---|---|---|
![]() | alpha : Number material opacity
| Material | |
![]() | blendMode : 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 | ||
![]() | precision : Number Perspective correction precision rate.
| TextureMaterial | |
| refreshRate : int The material's texture refresh rate.
| MovieClipMaterial | ||
![]() | repeat : Boolean Texture repeat.
| TextureMaterial | |
![]() | smooth : Boolean Texture smoothing while scaling.
| TextureMaterial | |
![]() | surface : Surface
Surface material.
| SurfaceMaterial | |
![]() | texture : Texture
Material texture.
| TextureMaterial | |
![]() | wireColor : uint Wire line color.
| TextureMaterial | |
![]() | wireThickness : Number Wire line thickness.
| TextureMaterial | |
| Method | Defined 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 | ||
| clipRect | property |
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.
public function get clipRect():Rectangle
public function set clipRect(value:Rectangle):void
| fillColor | property |
public var fillColor:uintThe material's texture is filled with this color before movie clip is rendered.
| matrix | property |
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.
public function get matrix():Matrix
public function set matrix(value:Matrix):void
| movieClip | property |
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
| refreshRate | property |
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
| 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.
ParametersmovieClip:MovieClip — the movie clip which is used as an interactive texture |
|
textureWidth:uint — the material's texture width |
|
textureHeight:uint — the 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
| clone | () | method |
public override function clone():MaterialCreates a clone of the material object.
ReturnsMaterial — a clone of the material object |