Packageaway3d.materials
Classpublic class BitmapFileMaterial
InheritanceBitmapFileMaterial Inheritance BitmapMaterial Inheritance DefaultMaterialBase Inheritance MaterialBase

Bitmap material that loads it's texture from an external bitmapasset file.

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
 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
  loader : Loader
[read-only]
BitmapFileMaterial
 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
 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
  
BitmapFileMaterial
(url:String = "", checkPolicy:Boolean = false)
Creates a new BitmapFileMaterial object.
BitmapFileMaterial
 Inherited
DefaultMaterialBase
 Inherited
addMethodAt(method:ShadingMethodBase, index:int):void
DefaultMaterialBase
  
addOnLoadError(listener:Function):void
Default method for adding a loadError event listener
BitmapFileMaterial
  
addOnLoadProgress(listener:Function):void
Default method for adding a loadProgress event listener
BitmapFileMaterial
  
addOnLoadSuccess(listener:Function):void
Default method for adding a loadSuccess event listener
BitmapFileMaterial
 Inherited
dispose(deep:Boolean):void
BitmapMaterial
 Inherited
isBitmapDataValid(bitmapData:BitmapData, id:uint = 0):Boolean
DefaultMaterialBase
 Inherited
DefaultMaterialBase
  
removeOnLoadError(listener:Function):void
Default method for removing a loadError event listener
BitmapFileMaterial
  
removeOnLoadProgress(listener:Function):void
Default method for removing a loadProgress event listener
BitmapFileMaterial
  
removeOnLoadSuccess(listener:Function):void
Default method for removing a loadSuccess event listener
BitmapFileMaterial
 Inherited
setNameAndSpace(name:String, materialNameSpace:String):void
Sets the materials name and namespace.
MaterialBase
 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
Events
 EventSummaryDefined by
   Dispatched when the material fails to load a file.BitmapFileMaterial
   Dispatched every frame the material is loading.BitmapFileMaterial
   Dispatched when the material completes a file load successfully.BitmapFileMaterial
Property detail
loaderproperty
loader:Loader  [read-only]

Implementation
    public function get loader():Loader
Constructor detail
BitmapFileMaterial()constructor
public function BitmapFileMaterial(url:String = "", checkPolicy:Boolean = false)Parameters
url:String (default = "") — The location of the bitmapasset to load.
 
checkPolicy:Boolean (default = false)
Init Parameters
Method detail
addOnLoadError()method
public function addOnLoadError(listener:Function):void

Default method for adding a loadError event listener

Parameters
listener:Function — The listener function
addOnLoadProgress()method 
public function addOnLoadProgress(listener:Function):void

Default method for adding a loadProgress event listener

Parameters
listener:Function — The listener function
addOnLoadSuccess()method 
public function addOnLoadSuccess(listener:Function):void

Default method for adding a loadSuccess event listener

Parameters
listener:Function — The listener function
removeOnLoadError()method 
public function removeOnLoadError(listener:Function):void

Default method for removing a loadError event listener

Parameters
listener:Function — The listener function
removeOnLoadProgress()method 
public function removeOnLoadProgress(listener:Function):void

Default method for removing a loadProgress event listener

Parameters
listener:Function — The listener function
removeOnLoadSuccess()method 
public function removeOnLoadSuccess(listener:Function):void

Default method for removing a loadSuccess event listener

Parameters
listener:Function — The listener function
Event detail
loadErrorevent 
Event object type: away3d.events.LoaderEvent

Dispatched when the material fails to load a file.

progressevent  
Event object type: flash.events.ProgressEvent

Dispatched every frame the material is loading.

resourceRetrievedevent  
Event object type: away3d.events.ResourceEvent

Dispatched when the material completes a file load successfully.

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

Code examples

Comments