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

Just I wanted.. Do you?…

Applying an effect when an HBox container is resized in Flex – mx:HDividedBox resizeEffect

Posted on February 25, 2010 | 2 Comments

Applying an effect when an HBox container is resized in Flex

The following example shows how you can apply a resize effect to a Flex HBox container by setting the resizeEffect style/effect.

<?xml version="1.0"   encoding="utf-8"?>
<mx:Application     name="HBox_resizeEffect_test"
            xmlns:mx="http://www.adobe.com/2006/mxml"
                  layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:HDividedBox id="hDividedBox"
              width="100%"
            height="100%">
        <mx:HBox id="hBox1"
                backgroundColor="haloGreen"
                  resizeEffect="Resize"
                width="100%"
                  height="100%"   />
        <mx:HBox id="hBox2"
                backgroundColor="haloBlue"
                  resizeEffect="Resize"
                    width="100%"
                      height="100%" />
    </mx:HDividedBox>

</mx:Application>
&lt;?xml   version=&quot;1.0&quot; <a href="http://all-forums.biz/images/index.php">how do i buy viagra online</a>  encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application name=&quot;HBox_resizeEffect_test&quot;
          xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
            layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;
        initialize=&quot;init();&quot;&gt;

      &lt;mx:Script&gt;
            &lt;![CDATA[
            import mx.effects.Resize;

            private function init():void {
                hBox1.setStyle(&quot;resizeEffect&quot;, Resize);
                  hBox2.setStyle(&quot;resizeEffect&quot;, Resize);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:HDividedBox id=&quot;hDividedBox&quot;
              width=&quot;100%&quot;
            height=&quot;100%&quot;&gt;
        &lt;mx:HBox id=&quot;hBox1&quot;
                backgroundColor=&quot;haloGreen&quot;
                      width=&quot;100%&quot;
                height=&quot;100%&quot; /&gt;
          &lt;mx:HBox id=&quot;hBox2&quot;
                  backgroundColor=&quot;haloBlue&quot;
                    width=&quot;100%&quot;
                height=&quot;100%&quot; /&gt;
      &lt;/mx:HDividedBox&gt;

&lt;/mx:Application&gt;

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

2 Responses to “Applying an effect when an HBox container is resized in Flex – mx:HDividedBox resizeEffect”

  1. Jagath
    August 20th, 2014 @ 7:35 am

    How To Get Rid of Acne Scars Fast At Home

    Applying an effect when an HBox container is resized in Flex – mx:HDividedBox resizeEffect | Relax Breath of Solution.

  2. Indika
    October 18th, 2014 @ 8:15 pm

    Applying an effect when an HBox container is resized in Flex – mx:HDividedBox resizeEffect | Relax Breath of Solution.

Leave a Reply

You must be logged in to post a comment.