Packageaway3d.materials
Classpublic class AnimatedBitmapMaterial
InheritanceAnimatedBitmapMaterial Inheritance BitmapMaterial Inheritance DefaultMaterialBase Inheritance MaterialBase

Class allows fast rendering of animations by caching bitmapdata objects for each frame. The sequence of bitmapdatas are generated from a movieclip source or can be an array of bitmadatas passed to the class. Suitable for short animations.

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
AnimatedBitmapMaterial
 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
  index : int
returns the frame index of the animation.
AnimatedBitmapMaterial
 Inheritedlights : Array
MaterialBase
  loop : Boolean
AnimatedBitmapMaterial
 InheritedmaterialNamespace : String
The namespace of the material, used by the MaterialLibrary.
MaterialBase
 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
  normalMapSources : Array
[read-only] returns the frames of the animation.
AnimatedBitmapMaterial
 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
  sources : Array
[read-only] returns the frames of the animation.
AnimatedBitmapMaterial
 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
  
AnimatedBitmapMaterial
(movie:MovieClip = null, loop:Boolean = true, autoPlay:Boolean = false, index:uint = 0, defaultBitmapData:BitmapData = null)
Creates a new AnimatedBitmapMaterial object.
AnimatedBitmapMaterial
 Inherited
DefaultMaterialBase
 Inherited
addMethodAt(method:ShadingMethodBase, index:int):void
DefaultMaterialBase
  
clear(disposeNormalMaps:Boolean = false):void
Manually clears all frames of the animation.
AnimatedBitmapMaterial
 Inherited
dispose(deep:Boolean):void
BitmapMaterial
 Inherited
isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean
DefaultMaterialBase
  
play():void
Resumes playback of the animation
AnimatedBitmapMaterial
 Inherited
DefaultMaterialBase
  
setMaps(sources:Array, dispose:Boolean = false):void
Resets the cached bitmapData objects making up the animation with a pre-defined array.
AnimatedBitmapMaterial
  
setMovie(movie:MovieClip):void
Resets the movieclip used by the material.
AnimatedBitmapMaterial
 Inherited
setNameAndSpace(name:String, materialNameSpace:String):void
Sets the materials name and namespace.
MaterialBase
  
setNormalMaps(nmsources:Array, dispose:Boolean = false):void
Resets the cached normalMaps bitmapData objects making up the animation with a pre-defined array.
AnimatedBitmapMaterial
  
stop():void
Halts playback of the animation
AnimatedBitmapMaterial
 Inherited
updateTexture():void
Triggers an update of the texture, to be used when the contents of the BitmapData has changed.
BitmapMaterial
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
indexproperty 
index:int  [read-write]

returns the frame index of the animation.

Implementation
    public function get index():int
    public function set index(value:int):void
loopproperty 
loop:Boolean  [read-write]Implementation
    public function get loop():Boolean
    public function set loop(value:Boolean):void
normalMapSourcesproperty 
normalMapSources:Array  [read-only]

returns the frames of the animation. an array of bitmapdatas

Implementation
    public function get normalMapSources():Array
sourcesproperty 
sources:Array  [read-only]

returns the frames of the animation. an array of bitmapdatas

Implementation
    public function get sources():Array
Constructor detail
AnimatedBitmapMaterial()constructor
public function AnimatedBitmapMaterial(movie:MovieClip = null, loop:Boolean = true, autoPlay:Boolean = false, index:uint = 0, defaultBitmapData:BitmapData = null)Parameters
movie:MovieClip (default = null) — [optional] The movieclip to be bitmap cached for use in the material. if no movieclip is provided, defaultBitmapData parameter must be set. Default is null.
 
loop:Boolean (default = true) — [optional] If the sequence is played over and over.Default is true;
 
autoPlay:Boolean (default = false) — [optional] If the sequence is playing automatically. Default is true;
 
index:uint (default = 0) — [optional] The index at which the sequence will start first. Default = 0;
 
defaultBitmapData:BitmapData (default = null) — [optional] Default bitmapdata used till a setFrames or setMovie is used. Default = null;
Init Parameters
Method detail
clear()method
public function clear(disposeNormalMaps:Boolean = false):void

Manually clears all frames of the animation. a new series of bitmapdatas will be required using the setFrames handler.

Parameters
disposeNormalMaps:Boolean (default = false) — If normalMaps needs to be disposed as well. Default is false;
play()method 
public function play():void

Resumes playback of the animation

setMaps()method 
public function setMaps(sources:Array, dispose:Boolean = false):void

Resets the cached bitmapData objects making up the animation with a pre-defined array.

Parameters
sources:Array — If the previous sequence maps needs to be disposed. Default is false;
 
dispose:Boolean (default = false)
setMovie()method 
public function setMovie(movie:MovieClip):void

Resets the movieclip used by the material.

Parameters
movie:MovieClip — The movieclip to be bitmap cached for use in the material.
setNormalMaps()method 
public function setNormalMaps(nmsources:Array, dispose:Boolean = false):void

Resets the cached normalMaps bitmapData objects making up the animation with a pre-defined array.

Parameters
nmsources:Array — If the previous sequence maps needs to be disposed. Default is false;
 
dispose:Boolean (default = false)
stop()method 
public function stop():void

Halts playback of the animation

Wiki link
Click to go to the wiki page for 'away3d.materials.AnimatedBitmapMaterial'

Code examples

Comments