2 Replies Latest reply on Jul 31, 2008 5:57 PM by Gregory Lafrance

    Functions for Controls Inside an ItemRenderer

    katychapman85 Level 1
      I have a TileList control with an ItemRenderer. Inside the ItemRenderer I have a Canvas Control, I want the Canvas Control to call a function when the mouse moves over it.

      <mx:TileList
      x="2" y="237"
      direction="horizontal"
      dataProvider="{MakeUpColours.lastResult.Colour}"
      backgroundColor="#FFFFFF"
      width="288" height="167.04999"
      themeColor="#FFFFFF">

      <mx:itemRenderer>
      <mx:Component>
      <mx:Canvas width="35" height="35">
      <mx:Canvas width="30" height="30" x="5" y="5" mouseMove="mouseMoveHandler(event);">
      <mx:Image source=" http://localhost/Flex/Personalised%20Palettes-debug/{data.@PictureSrc}"/>
      <mx:Label text="{data.@ColourNo}"/>
      </mx:Canvas>
      </mx:Canvas>
      </mx:Component>
      </mx:itemRenderer>
      </mx:TileList>

      However I get the error: Call to a possibly undefined method mouseMoveHandler. How can I call functions on controls inside itemRenderers?

      Thanks
      Katy