1 Reply Latest reply on Nov 19, 2008 2:43 PM by FrankyG813

    How does one link URLS to listbox items

    FrankyG813
      Hi, Great Forum!! I created a listbox based on a dataprovider (see both below).
      I want to be able to click on the item to access a web document on a different window. I have, what I believe are all the pieces, except I don't know what to pass into the function to read the URL clicked on. Please help
      =======================FUNCTION============================
      public function executeLink(event:MouseEvent):void {
      var u:URLRequest = new URLRequest(?????.data);
      navigateToURL(u,"_blank");
      }
      ============================================================
      <mx:ArrayCollection id="arrColl">
      <mx:source>
      <mx:Array>
      <mx:Object label="Getting Started Guide" data=" http://www.cnn.com" />
      <mx:Object label="Row 2" data=" http://www.cnn.co"/>
      </mx:Array>
      </mx:source>
      </mx:ArrayCollection>
      -------------------This is the list box -----------------------
      <mx:List id="list"
      alternatingItemColors="[0xEEEEEE, 0xDFDFDF]"
      dataProvider="{arrColl}"
      rowCount="20"
      width="133"
      click="executeLink(event)" labelField="label" height="434"/>