It is the same syntax.

Here's the more complete solution that I hope illustrate with to call property.
<code>
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var _sum:Number;
    private var _diff:Number;

    private function init():void
    {
        var test:Object = new Object();
        test.prop1 = 10;
        test.prop2 = 20;

        with( test )
        {
            _sum = prop1 + prop2;
            _diff = prop1 - prop2;
        }

        trace( _sum );  // Display 30
        trace( _diff ); // Display -10

        var test2:Object = new Object();
        test2.prop3 = 30;
        test2.prop4 = 40;

        with( test2 )
        {
            prop3 = test.prop1;
            prop4 = test.prop2;
        }
        trace( test2.prop3 ); // Display 10
        trace( test2.prop4 ); // Display 20
    }
    ]]>
    </mx:Script>
</mx:WindowedApplication>
</code>

Regards,
Edward Yakop

Reply via email to