As BitmapFileMaterial recycle?

Software: Away3D 4.x

tebitoq, Newbie
Posted: 24 November 2011 07:01 PM   Total Posts: 4

Hello, I wonder, as I can recycle BitmapFileMaterial I’m doing with dictionaries in this way.

var sprite3D:Sprite3D;
   var 
spriteMat:BitmapFileMaterial;
   
    
trace (oElement.url); 
    
   if( 
miDiccionario[oElement.url] != null 
   
{
    spriteMat  
miDiccionario[oElement.url];
    
trace ("recycle");
    
   
}else
   {
    spriteMat 
= new BitmapFileMaterial(oElement.url true);
    
spriteMat.alphaThreshold 0.65;
    
spriteMat.lights _lights;
    
miDiccionario[oElement.url] spriteMat;
    
trace ("New");
   
}
   sprite3D   
= new Sprite3D(spriteMat,spriteMat.bitmapData.width,spriteMat.bitmapData.height); 

 


but it happens that when you want at runtime recycled material is giant sprite, it is this.


regards

   

tebitoq, Newbie
Posted: 29 November 2011 09:03 PM   Total Posts: 4   [ # 1 ]

anyone tell me how to recycle the textures?


regards

   
   
‹‹ Lot of cubes problem

X

Away3D Forum

Member Login

Username

Password

Remember_me



X