3 Replies Latest reply on May 18, 2011 10:08 AM by learner_doug

    Problem showing tooltip in state

    Alberto_Mz_Dz

      Hi,

       

      I have an application where I am using 2 states, the first state is like a login page and in the other I have some components, one of them is a textinput.

      I want to show a custom tooltip using the rollOver and rollOut events, something like this:

       

      var tltMensaje:ToolTip;

       

       

      <s:TextInput x="107" y="126" rollOut="textinput1_rollOutHandler(event)"

      rollOver="textinput1_rollOverHandler(event)"/>

       

       

       

      protected function textinput1_rollOverHandler(event:MouseEvent):void

      {

      // TODO Auto-generated method stub

      tltMensaje = ToolTipManager.createToolTip("MyMessage",

      event.currentTarget.x + event.currentTarget.width,

      event.currentTarget.y, "errorTipRight",

      IUIComponent(event.currentTarget)) as ToolTip;

      }

       

      protected function textinput1_rollOutHandler(event:MouseEvent):void

      {

      // TODO Auto-generated method stub

      ToolTipManager.destroyToolTip(tltMensaje);

      }

       

       

      So when I go from the first state (login) to  the next and I move the mouse cursor over the TextInput the tooltip appears like a white frame.

      I guess this is because the tooltip object is not in the current state but I dont know for sure.

       

      Tooltip.png

       

      Can anyone help me??

       

      Thanks

       

      Alberto