how about this?

// you've got your bitmap, wherever it came from
var bitmap:Bitmap;

var comp:UIComponent = new UIComponent();
comp.addChild(bitmap);

then add the UIComponent to the container you want to add it to. You might not be able to add a Bitmap directly to a container, but nobody said you can't add it to a UIComponent first. You gotta be sneaky.



davidmccallie wrote:

Noobie question here: I want to animate a complex dissolve of a
mosaic of hundreds of small pictures that make up a photo mosaic.
Each picture (32x32) will dissolve to a second image in parallel with
all the others. I tried to do this in Flex, using Image() objects
placed on a Canvas container, with a set of Fade effects for the
animation.
I can display the mosaic of the images at the start, but when I try to
Play the Fade() on each image, the Canvas appears to "batch" all the
updates and does not show changes until all the fades are done -- at
which point the whole canvas repaints showing all the new images --
without any visible animation! (I know that the fades are occurring
because I can trace them fine.)

I tried an alternate approach using pure ActionScript 3 with the
PixelDissolve method of Bitmapdata class. This works fine, but it
appears that if I want to use Bitmaps as display objects, I can't use
any of the Flex containers to hold them since you can't do an
addChild(bitmap) to a Flex container (which expects only IUIComponent.)

Is there any way to force the Canvas to show the updates to the
hundreds of Images as they occur? I tried various uses of
ValidateNow() but that didn't do anything.

If I want to use low-level bitmaps and PixelDissolve, is there any
clean way to do that within the Flex framework? How can I draw
Bitmaps onto a Flex container?

Thanks!!


Reply via email to