Nov 02 2004

Flex Tip 5: Improving performance when resizing Panel containers

Published by at 23:26 under Wayback Archive

So as you’ve probably read, Flex 1.5 has been released. Since I did not have a lot of time to play with the internal betas I am learning a huge amount of new stuff here at the MAX conference.

One of the small new improvements which I think is a beauty – and hard to find unless you read through the updated PDFs thoroughly – is the ability to hide children of components whilst you are triggering Resize effects on them. This will greatly help you to improve performance in ‘experience heavy’ applications.

A  shameless copy-paste from the  documentation:

When you apply a Resize effect to a Panel container, the measurement and layout algorithm for the effect executes on every frame of the animation. When a Panel container has many children, the animation can be jerky because Macromedia Flex cannot update the screen quickly enough.

Also, resizing one Panel container often causes other Panel containers to resize as well. To solve this problem, you can use the Resize effect’s hideChildren property to hide the children of Panel containers while the Resize effect is playing. The value of the hideChildren property is an Array of Panel containers that should include the Panel containers that resize during the animation. Before the Resize effect plays, Flex iterates through the Array and hides the children of each of the specified Panel containers.

 

No responses yet

Comments are closed.