1 Reply Latest reply on Jul 7, 2006 3:05 PM by ntsiii

    How to call a itemrenderer function?

    FredFlex
      Hello,

      I use a TileList with my own renderer. I want to call a public function from my itemrenderer (Thubnail.mxml) but it doesn't work. I have this compil message:
      Err 1061 method undefined

      Please Help!


      <mx:TileList dataProvider="{PhotoDataProvider}"
      itemRenderer="Thumbnail"
      itemClick="DoList_ItemClick(event)"
      itemRollOver="Thumbnail.mouseOutHandler(event)"
      />



      Thumbnail.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:HBox xmlns:mx=" http://www.adobe.com/2006/mxml" backgroundAlpha="0">
      ......
      <mx:HBox id="buttons" visible="true" verticalGap="4" paddingRight="8" right="8" top="12">
      <mx:Button id="bp_trash" width="14" height="14"
      toolTip="Del"
      icon="@Embed('assets/trashcan.png')"/>
      <mx:Button id="bp_edit" width="14" height="14"
      toolTip="Edit"
      icon="@Embed('assets/icon_details.png')"/>
      </mx:HBox>
      <mx:Label text="{data.pho_label}" fontWeight="bold"/>
      <mx:Label text="{data.pho_timestamp}" />
      </mx:VBox>
      <mx:Script>
      <![CDATA[
      public function mouseOverHandler(event:MouseEvent):void
      {
      setStyle("borderColor", "#CCCCCC");
      setStyle("dropShadowEnabled", "true");
      setStyle("dropShadowColor", "#000000");
      setStyle("shadowDistance", 2);
      buttons.visible = true;
      }

      public function mouseOutHandler(event:MouseEvent):void
      {
      setStyle("borderColor", "#FFFFFF");
      setStyle("dropShadowEnabled", "false");
      buttons.visible = false;
      }

      ]]>

      </mx:Script>
      </mx:HBox>