5 Replies Latest reply on Sep 25, 2017 4:49 PM by robdillon

    Adobe Flash - Error, "Access of Undefined Property"

    bens47991640

      How to fix an undefined property compiler error in Adobe Flash CS6?

        • 1. Re: Adobe Flash - Error, "Access of Undefined Property"
          bens47991640 Level 1

          Also, need to know how to create a Mouse Click Event.

           

          Ex:

           

          Master.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_131);

           

          function fl_MouseClickHandler_131(event:MouseEvent):void

          {

            fscommand("exec", "Master_Supply_List.app");

          }

          • 2. Re: Adobe Flash - Error, "Access of Undefined Property"
            RandomlyFish Level 3

            Something that is undefined, does not exist. So your code is trying to access something that doesn't exist. Could you paste the code you're using?

            • 3. Re: Adobe Flash - Error, "Access of Undefined Property"
              bens47991640 Level 1

              /* Stop at This Frame

              The Flash timeline will stop/pause at the frame where you insert this code.

              Can also be used to stop/pause the timeline of movieclips.

              */

               

              stop()

               

              /* Mouse Click Event

              Clicking on the specified symbol instance executes a function in which you can add your own custom code.

               

              Instructions:

              1. Add your custom code on a new line after the line that says "// Start your custom code" below.

              The code will execute when the symbol instance is clicked.

              */

               

              MainMenu.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_100);

               

              function fl_MouseClickHandler_100(event:MouseEvent):void

              {

                gotoAndStop(1);

              }

               

              /* Mouse Click Event

              Clicking on the specified symbol instance executes a function in which you can add your own custom code.

               

              Instructions:

              1. Add your custom code on a new line after the line that says "// Start your custom code" below.

              The code will execute when the symbol instance is clicked.

              */

               

              Song_1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_101);

               

              function fl_MouseClickHandler_101(event:MouseEvent):void

              {

                fscommand("exec", "Song_1.app");

              }

              • 4. Re: Adobe Flash - Error, "Access of Undefined Property"
                RandomlyFish Level 3

                For the error, does it say what line is causing it?

                • 5. Re: Adobe Flash - Error, "Access of Undefined Property"
                  robdillon Most Valuable Participant

                  The error is trying to tell you that something in the code can't be found. The problem may not be a property, it may be an object. If you, for instance, put your code in frame 1 of the timeline and some object that is referenced, Song_1, for instance, doesn't appear in frame 1, then the Actionscript can't resolve the object with the code. Another common problem is a simple typo: Song_1 is not the same as song_1, to Actionscript for instance.