1 Reply Latest reply on May 16, 2008 5:28 PM by Gregory Lafrance

    Implementing IFlexDisplayObject

    Tikis_Mikis
      Ok I am creating a popup manager but I need to pass in an IFlexDisplayObject. The problem is that I am calling OrderEdit.mxml DYNAMICALLY:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow xmlns:mx=" http://www.adobe.com/2006/mxml"
      title="Edit Order"
      layout="vertical"
      showCloseButton="true"
      width="440"
      height="352" close="titleWindow_close();" backgroundColor="#e6eeee" borderColor="#ABCAE5" borderAlpha="1">

      <mx:Script>
      <![CDATA[
      import mx.events.CloseEvent;
      import mx.managers.PopUpManager;

      private function titleWindow_close():void
      {
      PopUpManager.removePopUp(this);
      }

      private function onSaveButtonClick(event:Event):void
      {
      var e:EventDispatcher = new EventDispatcher();
      e.dispatchEvent(event);
      }
      ]]>
      </mx:Script>
      <mx:Canvas width="100%" height="100%">
      <mx:TextInput x="0" y="66"/>
      <mx:Label x="0" y="10" text="Customer:" fontWeight="bold" fontSize="12"/>
      <mx:Label x="0" y="47" text="Order Name:" fontWeight="bold" fontSize="12"/>
      <mx:Text x="81" y="12" id="customerName"/>
      <mx:Label x="177" y="47" text="Order Description:" fontWeight="bold" fontSize="12"/>
      <mx:TextArea x="177" y="67" width="232" height="56"/>
      <mx:Label x="0" y="152" text="Cost:" fontWeight="bold" fontSize="12"/>
      <mx:Text x="43" y="152" id="cost"/>
      <mx:Label x="177" y="150" text="Started:" fontWeight="bold" fontSize="12"/>
      <mx:Label x="319" y="150" text="Ended:" fontWeight="bold" fontSize="12"/>
      <mx:Label x="177" y="224" text="Last Updated:" fontWeight="bold" fontSize="12"/>
      <mx:Label x="319" y="224" text="Deleted On:" fontWeight="bold" fontSize="12"/>
      <mx:Button y="279" label="Save" horizontalCenter="-2"/>
      <mx:DateField x="177" y="166" id="dateStarted" text=""/>
      <mx:DateField x="319" y="166"/>
      <mx:DateField x="177" y="240"/>
      <mx:DateField x="319" y="240"/>
      </mx:Canvas>

      </mx:TitleWindow>

      So how do I make my MXML above implement IFlexDisplayObject????