11 Replies Latest reply on Aug 15, 2011 2:47 PM by kglad

    Can anyone help me with this 1120 error? So frustrated...

    freakyword

      I have those two objects homeS and galleryS and two corresponding functions to change the size of their layer masks. The structure of the two are

      exactly the same except for their names and positions. However, only one of them functions.

       

      The instance's name is the same in the code and there is only one key frame in the layer where movieClip "galleryMsk" is.

      But Flash always through this 1120 error saying "undefined property galleryMsk"...

      I don't know why it happens since part I is functioning perfectly.

      The only thing is that object "homeMsk" and object"galleryMsk" are in the same layer mask, does that cause the trouble?

      I am so frustrated and I cannot focus on anything else in the whole day...couldn't even sit down and watch tv happily...

      Here are the two parts of the code. Part I is working Part II is not...

       

       

       

      homeS.addEventListener(MouseEvent.MOUSE_OVER,f_homeDisplay);

      function f_homeDisplay(event:MouseEvent):void

          {

       

                homeBtn.gotoAndPlay("home_pass");

                changeContent(homeMsk,-62.8,0);

                changeContent(homeS, -62.8,0);

                homeS.removeEventListener(MouseEvent.MOUSE_OVER,f_homeDisplay);

           }  //Part I

       

       

      galleryS.addEventListener(MouseEvent.MOUSE_OVER,f_galleryDisplay);

      function f_galleryDisplay(event:MouseEvent):void

           {

       

                galleryBtn.gotoAndPlay("gallery_pass");

                changeContent(galleryMsk,-56.55,160);

                changeContent(galleryS, -56.55,160);

                galleryS.removeEventListener(MouseEvent.MOUSE_OVER,f_galleryDisplay);

           } //Part II