Triggering effects when a container is resized – mx:ControlBar – resizeEffect – mx:Resize
Posted on July 25, 2009 | No Comments
The following example uses a resizeEffect effect along with a Resize tween effect () to create a smooth tween effect whenever the panel is resized.
< ?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:resize>
<mx:applicationcontrolbar dock="true">
<mx:button label="160x160"
<a href="http://over50losingweight.com/images/">order online levitra click="sizePanel(160, 160);" />
<mx:button label="240x160"
click="sizePanel(240, 160);"></mx:button>
</mx:button><mx:button <a href="http://marvabrooks.com/images/">buy viagra pill label="160x240"
click="sizePanel(160, 240);" />
<mx:button label="320x240"
click="sizePanel(320, 240);"></mx:button>
<mx:spacer width="100%"></mx:spacer>
<mx:label text="w:{panel.width}, <a href="http://jtc-enterprises.com/images/">buy levitra vardenafil h:{panel.height}" />
</mx:label></mx:button></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>
<mx:vbox label="Billing Information"></mx:vbox>
</mx:accordion>
<mx:controlbar id="cb">
<mx:button></mx:button>
<a href="http://amoxilbuysale.com">Order Generic Amoxil Online without Prescription</a> </mx:controlbar>
</mx:panel>
</mx:application>
Category: Action Script 3.0, Flex 3, Flex 3 Action Script 3 Tutorial
Tags: mx:Accordion | mx:AppControlBar | mx:ControlBar | mx:Resize | resizeEffect
Tags: mx:Accordion | mx:AppControlBar | mx:ControlBar | mx:Resize | resizeEffect
Comments
Leave a Reply
You must be logged in to post a comment.
Sameera at LinkedIn
