How to Tween the Alpha Value of a Plane with MovieMaterial in Papervision 3D 2.0
I spent an inordinate amount of time figuring out how to tween the alpha value of a Plane with MovieMaterial in Papervision 3D today. In case it saves anyone out there some time, here's how to access it:
MovieMaterial(plane.material).movie.alpha
The DisplayObject3D class has an alpha property, but it doesn't seem to affect the material inside the object. I can't say I completely understand why it works, but it works. Note: The "animated" property of your MovieMaterial must be set to "true."
Oddly, this does not work:
plane.material.movie.alpha
Even though "plane.material" seems to be a MovieMaterial object, "movie" comes back as an undefined property when compiling. I'm sure it has something to do with data type information in AS3 that I don't quite comprehend yet.
In case this happens to be a weird version issue, I'm using OS X 10.5.8, Flash CS4 and Papervision3D 2.0.869. Lastly, here's the gotoAndLearn() forum thread that pointed me in the right direction.
2 comments
