Skip navigation
deafsweetesthoney
Currently Being Moderated

1120: Access of undefined property error

May 11, 2012 2:39 PM

Tags: #action_script_3 #movieclip #actionscript_3.0

Does anybody see what I'm doing wrong?  I'm new to the coding part of flash which I guess means I'm still pretty new to Flash.  Thanks in advance for any help.

 

I recieved the repeating errors:

 

G:\Flash\Project 2\Project2\DD3.as, Line 1031120: Access of undefined property Lightningflash.
G:\Flash\Project 2\Project2\DD3.as, Line 771120: Access of undefined property Lightningflash.
G:\Flash\Project 2\Project2\DD3.as, Line 591120: Access of undefined property Lightningflash.
G:\Flash\Project 2\Project2\DD3.as, Line 301120: Access of undefined property Lightningflash.

 

Code:

 

import flash.display.MovieClip;

          import flash.events.*;

          import flash.net.*;

          import fl.video.*;

 

          public class DD3 extends MovieClip

          {

                    //boolean to track whether the trailer is playing (for buttons) and/or producing sound

                    private var isPlaying:Boolean = false;

                    private var isMuted:Boolean = false;

 

                    //attributes

 

 

                    //constructor

                    public function DD3()

                    {

                              //stops all animations (besides the background)

                              trailer.stop();

                              board.stop();

                              board.player.stop();

                              board.muter.stop();

                              Lightningflash.stop();

 

 

                              //sets the movie controls to function as buttons

                              board.player.mouseEnabled = true;

                              board.player.buttonMode = true;

                              board.muter.mouseEnabled = true;

                              board.muter.buttonMode = true;

 

                              //adds appropriate event listeners

                              board.docButton.addEventListener(MouseEvent.MOUSE_UP, gotoDoc);

                    }

 

                    //event function for the "documentation" button

                    public function gotoDoc(e:MouseEvent):void

                    {

                              //makes the trailer "disappear"

                              trailer.stop();

                              trailer.visible = false;

                              seeker.visible = false;

                              isPlaying = false;

 

                              //shoot some lightning from the background

                              Lightningflash.gotoAndPlay("lightning");

 

                              //navigates to the billboard's "documentation" frame and resets event listeners

                              board.gotoAndStop("Doc");

 

                              board.bkButton.addEventListener(MouseEvent.MOUSE_UP, goBack);

                              board.docScroll.update();

                    }

 

The rest of the code are mostly repeating but I am missing something. I know I need to define the Lightningflash but how?

 
Replies
  • kglad
    72,274 posts
    Jul 21, 2002
    Currently Being Moderated
    May 12, 2012 1:33 PM   in reply to deafsweetesthoney

    what is Lightningflash?

     

    if it's a child movieclip of DD3, then you must make sure it exists on the first frame of your symbol with class DD3.  if it's defined outside of DD3, you must make DD3 dynamic.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points