0 Replies Latest reply on Apr 20, 2011 6:12 AM by Ameya Mogare

    Changing hit area color on mouse over of Text UI Comp

    Ameya Mogare Level 1

      Hi,

       

      I have a requirement where a repeater is rendering a Text UI comp which has 'htmlText' in DataSource.

      Now the task is to change hit area color of a Text when mouse is put near to it. (something similar to how a LinkButton works)

       

      In script: -

                  private function onMouseOver(event:MouseEvent, item:Object):void{
                     
                     
                  }
                 
                  private function onMouseOut(event:MouseEvent,item:Object):void{


                  }

       

      In UI: -

       

              <mx:Repeater id="rptAct_ATEST" dataProvider="{Act_A}">
                  <mx:Text  htmlText="{rptAct_ATEST.currentItem.act}" width="90%" textAlign="left" fontWeight="bold"
                            mouseOver="onMouseOver(event, event.currentTarget)" mouseOut="onMouseOut(event, event.currentTarget)"/>
              </mx:Repeater>

       

       

      Any idea how to achieve this?

       

      I could have used LinkButton UI comp directly, but

           1. label property was unable to render htmlText. (it was displayed along with html tags)

           2. word wrap functionality was not working when I specified width="90%" for LinkButton

       

      Please help.

       

      Thanks and regards,

      Amey