In case this helps anyone else, here is a fairly simple way to solve
this problem:

main.xml

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
xmlns:custom="custom.*">
     <mx:Script>
     <![CDATA[
         import mx.controls.Alert;

         public function updateObj(e:Event):void {
             detailsPanel.breed= e.target.label;
             detailsPanel.age = 5;
         }
     ]]>
     </mx:Script>
     <mx:Button label="Lab" click="updateObj(event)" />
     <mx:Button label="Poodle" click="updateObj(event)" />
     <mx:Label text="Details:" />
     <custom:Details id="detailsPanel" />

</mx:Application>

custom/Details.xml:

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml";
horizontalAlign="center" verticalAlign="middle">
     <mx:Script>
     <![CDATA[
         [Bindable]
         public var breed:String;

         [Bindable]
         public var age:Number;
     ]]>
     </mx:Script>
     <mx:Text text="Breed: {breed}" />
     <mx:Text text="Age: {age}" />
</mx:VBox>

This wasn't to original solution I was going for, but it is simple
enough.

Hope this helps someone else :)
Keith

Reply via email to