Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

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>
        < !&#91;CDATA&#91;
            private function sizePanel(w:uint, h:uint):void {
                  panel.width = w;
                panel.height = h;
            }
        &#93;&#93;>
    </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>

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Comments

Leave a Reply

You must be logged in to post a comment.