Author Topic: img plan with alpha  (Read 149 times)

carlos villy   «   on: July 16, 2012, 10:28:09 PM »
hi.. 

i have an image in a plane.. and what i need is to smoothly go from alpha =0.01 to alpha =1; over a a few seconds..

what should i do??
should i keep creating new shader eachtime??

  var mat1:Shader3D = new Shader3D("cara",[new ColorFilter(0x000000,.1)], false);
how can i keep changing this value??

thx a lot

georgefloros floros   «   Reply #1 on: July 18, 2012, 04:23:25 AM »
Hi Carlos,

 ColorFilter has a  "a" property.

  var mat1:Shader3D = new Shader3D("cara",[new ColorFilter(0x000000,.1)], false);
var   color:ColorFilter = mat1 .filters[0] as ColorFilter;
TweenMax.to(color,0.5,{a:1,repeat : -1 ,yoyo:true,ease:Sine.easeInOut});


carlos villy   «   Reply #2 on: July 21, 2012, 10:00:41 PM »
i just cheked..  and after a while i make it run..

but.. i wasnt looking for an external framework to do this.. all others flash 3d frameworks has an equivalent of an alpha property.. 

i think this is a very important property and its a bug that u need some other framework to create this effects..

but.. thx for letting me know this solution.

thx a lot

georgefloros floros   «   Reply #3 on: July 23, 2012, 07:42:03 AM »
Hi Carlos , 
You don't need TweenMax to change the "a" property.
You can change it inside your  Scene3D.UPDATE_EVENT.
If you have problem understanding  i can make an example for you.