1 Reply Latest reply on Feb 16, 2009 9:49 AM by Gregory Lafrance

    Help with drag/drop from TileList with itemRenderer

    lkellyv
      I'm new to Flex so please excuse the ignorance. I have created a TileList with an itemRenderer that consists of an Image and a Label to the right of it. What I'm looking for from a user perspective is that they will drag the element out of the TileList and have the resulting dragProxy (I think I have that terminology correct) be just the image (and I'd like to scale up the image since I'm only representing it as a thumbnail in the TileList). I found some code in the docs called "Example: Specifying the drag proxy" but I'm having trouble getting it to work. In the mouseOverHandler() function a variable is created called dragInitiator of type Image and the event.currentTarget passed into the function is cast as an Image and assigned to that variable. This doesn't work for me as I get a Type Coercion failed error trying to convert a TileList object into an Image object. Thanks in advance for any help.

      Here's my custom itemRenderer code, the TileList code, and the mouseOverHandler that causes the error: