1 Reply Latest reply on May 22, 2006 2:51 PM by zensoldier

    Question for beginner

    Level 7
      Hello,

      What difference between
      1) _root.onMouseMove = function() {
      2) this.onMouseMove = function() {
      3) onMouseMove = function() {

      for me it's the same

      thank you for person can help me

      Alain



        • 1. Re: Question for beginner
          zensoldier
          Scope.

          in example 1 you are checking to see if you have a mouse move event on the _root timeline.

          in example 2 you are checking to see if you have a mouse move event on the object you have the script on.

          In example 3 you are doing the same thing as example 2

          They all work the same for you because you probably have both 1 and 2 on the main timeline so _root and this are the same thing. If you had example 1 on the main timeline and example 2 on a movie clip then they would not be the same because the 1st would check for mouseMove on the stage and the second would check for mouseMove of the image.