The following example uses
Resizeeffect
Effect along with a resize tween effect (<mx: resize/>) to create a smooth tween effect whenever the Panel is resized <? XML version = "1.0" encoding = "UTF-8" ?>
<! -- Http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/ -->
< MX: Application Xmlns: MX = "Http://www.adobe.com/2006/mxml"
Layout = "Vertical"
Verticalalign = "Middle"
Backgroundcolor = "White" >
< MX: script >
<! [CDATA [
Private function sizepanel (W: uint, H: uint): void {
Panel. width = W;
Panel. Height = h;
}
]>
</ MX: script >
<MX: resizeID= "Resize" />
< MX: applicationcontrolbar Dock = "True" >
< MX: button Label = "160x160"
Click = "Sizepanel (160,160 );" />
< MX: button Label = "240x160"
Click = "Sizepanel (240,160 );" />
< MX: button Label = "160x240"
Click = "Sizepanel (160,240 );" />
< MX: button Label = "320x240"
Click = "Sizepanel (320,240 );" />
<MX: SpacerWidth= "100%" />
<MX: LabelText= "W: {panel. Width}, H: {panel. Height }" />
</MX: applicationcontrolbar>
< MX: Panel ID = "Panel"
Title = "Title"
Status = "Status"
Width = "320"
Height = "240"
Resizeeffect = "{Resize }" >
< MX: accordion ID = "Accordion"
Historymanagementenabled = "False"
Width = "100%"
Height = "100%" >
< MX: vbox Label = "Shipping information" />
< MX: vbox Label = "Billing information" />
</ MX: accordion >
< MX: controlbar ID = "CB" >
< MX: button />
</ MX: controlbar >
</ MX: Panel >
</MX: Application>