Hopefully easy - can’t change a bitmap material!

Software: Away3D 3.x

bakedbeing, Newbie
Posted: 25 October 2011 06:47 AM   Total Posts: 2

Hallo folks, for some reason I can’t change the bitmap material on a plane I’ve created in Away3D 3.

It was created like so:
  _note = new Plane({width:1014/4, height:480/4, segmentsW:28, segmentsH:12, material:_frontMaterial, back:_backMaterial, bothsides:true});
  _note.x = 0;
  _note.y = 0;
  _note.z = 0;

added like so:
  _noteContainer = new ObjectContainer3D();
  _noteContainer.addChild(_note);
 
  _view3D.scene.addChild(_noteContainer);

and now I want to change the material to one I’ve just loaded.I’ve tried a bunch of ways: change the material, the bitmapData, no result.

  _note.material = new BitmapMaterial(Cast.bitmap(front));
  _note.back = new BitmapMaterial(Cast.bitmap(back));
 
  _noteBmpFront.bitmapData = front.bitmapData.clone();
  _noteBmpBack.bitmapData = back.bitmapData.clone();
 
  _frontMaterial.bitmap = Cast.bitmap(front);
  _backMaterial.bitmap = Cast.bitmap(back);

and it won’t respond. I’ve also tried changing translation values on said note and had no result. It’s almost like the note’s been cloned and I have a reference to some other plane that isn’t visible.

Any ideas?

Thanks guys!

   

Avatar
80prozent, Sr. Member
Posted: 25 October 2011 11:00 AM   Total Posts: 430   [ # 1 ]

hi

are you shure you are rendering the view on every frame?

 Signature 

sorry…i hope my actionscript is better than my english…

   

bakedbeing, Newbie
Posted: 25 October 2011 10:26 PM   Total Posts: 2   [ # 2 ]

Thanks for the reply 80. I’m definitely rendering every frame - I’ve been rotating the container that the _note is in and that’s showing up fine.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X