Triggering effects when a container is resized – mx:ControlBar – resizeEffect – mx:Resize
by Sameera Thilakasiri on 25th February 2010 at 9:19 pm - Action Script 3.0, Flex 3, Flex 3 Action Script 3 Tutorial
The following example uses a resizeEffect effect along with a Resize tween effect (
<?xml version="1.0" encoding="utf-8"?>
<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:Resize id="resize" />
<mx:ApplicationControlBar dock="true">
<mx:Button label="160x160"
<a href="http://over50losingweight.com/images/">order online levitra</a> click="sizePanel(160, 160);" />
<mx:Button label="240x160"
click="sizePanel(240, 160);" />
<mx:Button <a href="http://marvabrooks.com/images/">buy viagra pill</a> label="160x240"
click="sizePanel(160, 240);" />
<mx:Button label="320x240"
click="sizePanel(320, 240);" />
<mx:Spacer width="100%" />
<mx:Label text="w:{panel.width}, <a href="http://jtc-enterprises.com/images/">buy levitra vardenafil</a> 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 />
<a href="http://amoxilbuysale.com">Order Generic Amoxil Online without Prescription</a> </mx:ControlBar>
</mx:Panel>
</mx:Application>
Sameera at LinkedIn