Dynamic change material ...

Software: Away3D 4.x

bardo, Member
Posted: 19 March 2012 05:45 PM   Total Posts: 79

... is it possible?

   

John Brookes, Moderator
Posted: 19 March 2012 06:21 PM   Total Posts: 732   [ # 1 ]

yes

   

bardo, Member
Posted: 19 March 2012 08:27 PM   Total Posts: 79   [ # 2 ]

i tried but it seems not work :

mesh.material.dispose();

then

mesh.material = my_new_material ;

but , with videoTexture , it seems to maintain the old texture!

   

John Brookes, Moderator
Posted: 19 March 2012 10:04 PM   Total Posts: 732   [ # 3 ]

var vt2:VideoTexture = new VideoTexture(“yourOther.flv”, 512, 512)
//this
//TextureMaterial(yourTextureMaterial).texture = vt2;
//or
TextureMaterial(planeMesh.material).texture = vt2;
vt2.player.play();

   

John Brookes, Moderator
Posted: 19 March 2012 10:12 PM   Total Posts: 732   [ # 4 ]

or

YourVideoTexture.player.source = “RAM.f4v”;

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X