0 Replies Latest reply on Aug 7, 2007 8:40 AM by

    mouseOnScreen function

      I have a movie clip on my main timeline that contains a "mouseOnScreen" function. I am creating an expanding ad unit, so when the mouse is within the boundaries, I would like for the ad to go to a frame label, "expand" and when the mouse is outside of the movie go to a frame label called, "close"

      This behavior is working now, but the mouseOnScreen function is called repeatedly, so when it goes to "expand" it keeps playing just that single frame. I would like for the playhead to go to "expand" and then play the main timeline from there. Any ideas how to work around this problem?

      The code in my function is:

      if (mouseOnScreen()) {
      _root.gotoAndPlay("close");
      } else {
      _root.gotoAndPlay("expand");
      }

      and then in the second frame:

      gotoAndPlay(_currentframe-1);