2 Replies Latest reply on Aug 16, 2014 8:02 AM by sabrinabarrett461

    Error 1009: Very simple animation... cant figure it out!


      Here is my error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

        at GuitarAnimation_2_fla::MainTimeline/frame176()

        at flash.display::MovieClip/gotoAndStop()

        at GuitarAnimation_2_fla::MainTimeline/Chome()

      My animation is to teach the user what each strings name and sound is and how to play 3 different simple chords on a guitar. Each chord section has a sub section to learn the finger placements and also to hear/see the chord being played.

      I have 3 action layers- One for the main Navigation Buttons, One for the buttons on the guitar strings page, and one for the sub navigation buttons on each learn the chord page. I have pasted the code which I am recieving an error on. I ran the debugger and it said the issues is with line 7, which I have marked as red below. Below this code, is the full error I get when I run the debugger.


      //sub navigation

      import flash.events.MouseEvent;




      c_placebtn.addEventListener(MouseEvent.CLICK, c_place);

      hear_cbtn.addEventListener(MouseEvent.CLICK, c_hear);

      d_placebtn.addEventListener(MouseEvent.CLICK, d_place);

      hear_dbtn.addEventListener(MouseEvent.CLICK, d_hear);

      g_placebtn.addEventListener(MouseEvent.CLICK, g_place);

      hear_gbtn.addEventListener(MouseEvent.CLICK, g_hear);



      function c_place(event:MouseEvent):void {


        c_placebtn.alpha = 0;

        hear_cbtn.alpha = 100;


      function c_hear(event:MouseEvent):void {


        c_placebtn.alpha = 100;

        hear_cbtn.alpha = 0;


      function d_place(event:MouseEvent):void {


        d_placebtn.alpha = 0;

        hear_dbtn.alpha = 100;


      function d_hear(event:MouseEvent):void {


        d_placebtn.alpha = 100;

        hear_dbtn.alpha = 0;


      function g_place(event:MouseEvent):void {


        g_placebtn.alpha = 0;

        hear_gbtn.alpha = 100;


      function g_hear(event:MouseEvent):void {


        g_placebtn.alpha = 100;

        hear_gbtn.alpha = 0;




      Full debugger error

      Attempting to launch and connect to Player using URL C:\Users\owner\Documents\AIOP-Schoolwork\Interactive Authoring\Class Project\Guitar Animation_2.swf

      [SWF] C:\Users\owner\Documents\AIOP-Schoolwork\Interactive Authoring\Class Project\Guitar Animation_2.swf - 153383 bytes after decompression

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

        at GuitarAnimation_2_fla::MainTimeline/frame176()[GuitarAnimation_2_fla.MainTimeline::frame1 76:7]

        at flash.display::MovieClip/gotoAndStop()

        at GuitarAnimation_2_fla::MainTimeline/Chome()[GuitarAnimation_2_fla.MainTimeline::frame1:17 ]