<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/10/01/applying-an-effect-when-an-hbox-container-is-resized-in-flex/ -->
<mx:Application name="HBox_resizeEffect_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();">

    <mx:Script>
        <![CDATA[
            import mx.effects.Resize;

            private function init():void {
                hBox1.setStyle("resizeEffect", Resize);
                hBox2.setStyle("resizeEffect", Resize);
            }
        ]]>
    </mx:Script>

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

</mx:Application>