2 Replies Latest reply on Sep 13, 2013 1:16 PM by ladobeugm

    Mouseover woes....rollovers stick and won't mouseout

    ladobeugm

      I've used this method before but this time around, it's not working for me. The files are at:

      https://www.dropbox.com/s/ccgapo20p233h7z/rollover.zip

       

      Basically, there's a navbar on the top right. It's very simple. Six symbols. Each one has a half second animation of the black box fading in from 0 to 100%. Stop actions on 0 and half a second. Have this on the root for each button on mouseOver:

       

       

      var myBtnExploration = sym.getSymbol("btnExploration");

      myBtnExploration.play();

       

      and for mouseOut:

       

       

      var myBtnExploration = sym.getSymbol("btnExploration");

      myBtnExploration.playReverse();

       

      of course, the references to the symbols are different for each button. Nothing crazy.

       

      So what's happening at times is you rollover the first button you select (doesn't matter which) and the effect is fine. Anything after that and who knows. Usually it sticks on the rollover state on mouseOut. Anyone know why this is happening and what the fix might be?

        • 1. Re: Mouseover woes....rollovers stick and won't mouseout
          AMULI Level 4

          Hi ladobeugm,

           

          Your play() and playReverse() commands conflict with the triggers sym.stop() that are at the starting position. A psychologist from the Palo Alto school would say that you practise double bind : " Play ! ", " Stop ! ", which is one of the best way to make things (and people) go crazy

           

          You can get rid of the triggers at 0 ms : just uncheck the autoplay property of each of your buttons symbols (in the dialog when you convert to symbol ; or afterwards by editing the symbol).

           

          But you can't get rid of the triggers at 500 ms, at the end of the tweening. play() and playReverse() have a second parameter, Boolean, which is true by default, meaning "play the trigger at  starting position".

           

          So <myBtn>.playReverse( 500, false); fixes the problem.

           

          Gil

          • 2. Re: Mouseover woes....rollovers stick and won't mouseout
            ladobeugm Level 1

            Yea, much better. Thanks for the help.