0 Replies Latest reply on Aug 28, 2006 8:54 AM by Mark.P.

    mx:List & Drag n' Drop from XML

    Mark.P.
      I'm testing out the drag and drop features of flash but am getting a strange thing when i drag from one list to the next. The dropped text doesn't show the name from the first box, it shows [object Object].

      Here's the code which is straigt from one of the Drag and Drop examples, is there something I need to add to use XML?

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" width="100%" height="100%">

      <mx:Model id="menu" source="assets/dashXML.xml"/>
      <mx:HDividedBox x="0" y="0" width="100%" height="100%">

      <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#99CCFF">
      <mx:Panel x="0" y="0" width="100%" height="100%" layout="absolute" title="Importance" id="panel2">
      <mx:List id="first" x="0" y="0" width="100%" height="100%" dragEnabled="true" dropEnabled="true"
      dragMoveEnabled="true"/>
      </mx:Panel>
      </mx:Canvas>

      <mx:Canvas label="Canvas 2" width="100%" height="100%" backgroundColor="#FFFFCC">
      <mx:Panel x="0" y="0" width="100%" height="100%" layout="absolute" title="Importance" id="panel3">
      <mx:List id="second" x="0" y="0" width="100%" height="100%"
      dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
      dataProvider="{menu.product}" labelField="prodName"/>
      </mx:Panel>
      </mx:Canvas>

      </mx:HDividedBox>

      </mx:Application>