Skip navigation
Slateclean
Currently Being Moderated

Loaded .SWF generating Error 1010, Undefined Term.....

Jul 8, 2012 4:59 PM

Tags: #error #button #movieclip #actionscript3 #error#1010
TypeError: Error #1010: A term is undefined and has no properties.
     at navidMain_fla::MainTimeline/galleryLoaded()[navidMain_fla.MainTimeline::frame20:7]

 

This error occurs when I click on the button to open the PHOTOS page.

 

At Frame 1 of the parent movie:.


// PHOTOS -----------------------------
// Load the external .swf "photosMainMenu fl_raw.swf"
var gallerySWF:String = "assets/fla/photosMainMenu fl_raw.swf";
var galleryURLRequest:URLRequest = new URLRequest (gallerySWF);
var galleryLoader:Loader = new Loader();
galleryLoader.load(galleryURLRequest);

 

 

 

At Frame 20 of the parent movie is an empty movie clip, galleryContainer_mc.

 

Also at Frame 20:


galleryLoader.load(galleryURLRequest);
galleryLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, galleryLoaded);


function galleryLoaded(event)
{
          galleryContainer_mc.addChild(galleryLoader);
          galleryContainer_mc.gallery_mc.gotoAndPlay("start");
}

 

 

gallery_mc is the movie clip in which the frame label "start" resides.

 

My movie publishes... the photo gallery page loads and is placed on the stage, the (mask) animation playing only after I navigate to the page, as it should. Flash just keeps punching out that error message.

 
Replies
  • Currently Being Moderated
    Jul 8, 2012 6:23 PM   in reply to Slateclean

    If line 7 of frame 20 is the line...

     

       galleryContainer_mc.gallery_mc.gotoAndPlay("start");

     

    then chances are the problem is that gallery_mc is not being found.  Try putting a trace to see if that's the culprit.  Try putting: trace(galleryContainer_mc.gallery_mc); before that line and see if it comes up undefined/null.   If so, try to reason out why it might not exist when that line executes.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 9, 2012 4:48 AM   in reply to Slateclean

    I cannot tell from your followup if this is the case, but if gallery_mc happened to be in a different frame than whatever frame galleryContainer was at, then the error would occur.  It could also occur for any reason wherein the gallery_mc object does not exist (yet) as far as the code is concerned... such as gallery_mc...

     

    - is declared but not instantiated

    - doesn't have an instance name (or the instance name is mispelled)

    - is animated into place but is not assigned instance names in every keyframe for it

    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 10, 2012 9:21 AM   in reply to Slateclean

    You're welcome

     
    |
    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