more of a crossfade really, fading 1 out and fading the other in. but..
am calling the material via:
var testMovie:MovieClip = new testTransform() as MovieClip;
material:MovieMaterial = new
MovieMaterial(testMovie,{autoplay:false,loop:false});
where as
material:AnimatedBitmapMaterial = new
AnimatedBitmapMaterial(testMovie,{autoplay:false,loop:false});
when using AnimatedBitmapMaterial gives me the following error :
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at away3d.materials::BitmapMaterial/get
width()[/Users/******/Documents/Flex Builder
3/aw3d/src/away3d/materials/BitmapMaterial.as:362]
at
away3d.materials::TransformBitmapMaterial/getUVData()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/materials/TransformBitmapMaterial.as:344]
at
away3d.materials::BitmapMaterial/renderTriangle()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/materials/BitmapMaterial.as:640]
at
away3d.materials::TransformBitmapMaterial/renderTriangle()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/materials/TransformBitmapMaterial.as:678]
at
away3d.core.draw::DrawTriangle/render()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/core/draw/DrawTriangle.as:258]
at
away3d.core.render::BasicRenderer/render()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/core/render/BasicRenderer.as:100]
at
away3d.core.render::AbstractRenderSession/render()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/core/render/AbstractRenderSession.as:416]
at
away3d.core.render::AbstractRenderSession/render()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/core/render/AbstractRenderSession.as:411]
at away3d.containers::View3D/render()[/Users/******/Documents/Flex
Builder 3/aw3d/src/away3d/containers/View3D.as:966]
at experience/onEnterFrame()[/Users/******/Documents/Flex Builder
3/aw3d/src/experience.as:203]
Fabrice3D wrote:
oh its just a fade in?
if so, just make a movieclip with 2 containers, load the 2 images
and just play mc
if you pass this mc to moviematerial, set autoupdate to false
and just call update when you play your mc fade timeline.
Fabrice
On Dec 11, 2009, at 3:09 PM, Pierre Karadia wrote:
in my case I would have 243 bitmaps to tween and thus 486 if tweening
from 1 to the other, do you reckon this would have a massive
performance hit and most probably best to use preRender in a movie
material?
tia
Fabrice3D wrote:
if its a vector material, just tween colors using rbg and set color
value to material
if its a bitmapdata, just tween factors and apply colortransform
accordingly
if you prerender, use animatedbitmapMaterial or indeed moviematerial
Fabrice
On Dec 11, 2009, at 1:42 PM, Pierre Karadia wrote:
Dear All,
Is there a way to transform the color / material of an object. I
can switch materials quite easily but would like a transition..
I have been playing the Tweener to get the job done but _brightness
does not seem to be feature of materials.BitmapMaterial..
what is the easiest way, is it to cheat and do all the transitions
in a SWF and then just apply the material as a MovieMaterial and
then control the movie use play and stop()...
or can I use a Tweener class to crossfade the material? ie
transform the bitmapData
??
any thoughts
PK