17 Replies Latest reply on Aug 13, 2017 11:40 AM by NJArtist

    Issues with Mouseover and Mouseout

    NJArtist

      Hi All, I am trying to transition an old animation over from flash into html5. It would start out as a bar on the side and when hovered over, it would side across the screen and display its content Once the person moved off the content, it would slide back into place. it worked just fine in flash but doesn't translate well in html5. I have been able to set up the mouseover and mouseout functions, but it activates the mouseout gotoandplay function while still hovering over the content. Is there a way that i can have it only activate the animation once the cursor is fully off the content?

       

      below is the code i am using for both fucntions

       

      Mouseover

      this.stop();

       

      var frequency = 1;

       

      stage.enableMouseOver(frequency);

       

      this.movieClip_1.addEventListener("mouseover", fl_MouseOverHandlerToGoToAndPlayFromFrame.bind(this));

       

      function fl_MouseOverHandlerToGoToAndPlayFromFrame()

      {

      this.gotoAndPlay(2);

      }

       

      Mouseout

      this.stop();

       

      var frequency = 1;

       

      stage.enableMouseOver(frequency);

       

      this.movieClip_1.addEventListener("mouseout", fl_MouseOutHandlerToGoToAndPlayFromFrame.bind(this));

       

      function fl_MouseOutHandlerToGoToAndPlayFromFrame()

      {

      this.gotoAndPlay(8);

      }

       

      thanks for any help provided