2 Replies Latest reply on Sep 22, 2006 10:23 AM by Mister Peanut

    Cool Scrolling pic menu

    Mister Peanut Level 1
      Hello, if anyone could point me in the right direction, I'd really appreciate it. I have a bit of code that scrolls a graphic depending on if your mouse is on the left or right of center of the graphic. I would like the scrolling to stop if the mouse is rolled off of the stage and if the graphic reaches its end. The code I have looks like so:

      _root.onEnterFrame = function(){
      bigrow_mc._x = bigrow_mc._x + (0.5 * Stage.width - _root._xmouse)/10;
      };

      bigrow_mc is the name of my long, horizontal graphic that scrolls off the stage into oblivion. It goes forever. Really. The action works rather nicely, but how to get it to stop. I know I need an 'if' statement.... or a listener?

      var myListener:Object = new Object();
      myListener.onMouseOut = function() {
      stop();

      I know this is wrong, but I don't know where to go from here. I am new to Actionscript, but eager to learn. If there are any tutorials out ther that I could ber pointed to, I'd really appreciate it.