Any advice on "breaking down" an object from its layout in Flex - for animation?

If I have an object in a layout in Flex, this is a good way to "break" that layout so it can animate it.

For example, I have an image and caption angled. I want to shrink the image a little when the mouse flips it over. Since its active in the layout container, if I have to resize it then obviously it will move around everything else.

I don't think I can achieve what I want by just installing includeinlayout=false

.

Is there any experience with best practices in this matter?

My best idea I'm curious about is to make the image invisible and create another image at the same location using the screen coordinate transformation functions. This is jsut semes clumsy

+1


source to share


1 answer


Wrap your object with a fixed canvas size so that the top layout stays the same. Then put the object manually into that container and then set includeInLayout to false. At this point, you can do whatever you want with the interior object. Oh, also set clipContent to false. This should work whether you want it to grow or shrink.



If it's an itemrenderer or something you've wrapped in a class, you can handle it all in the class definition and make it transparent to the object's consumers. You can also write a mouseOver function that did what you wanted with an inner object that needs to scale.

+1


source







All Articles