• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jul 08, 2012 Jul 08, 2012

Copy link to clipboard

Copied

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.

TOPICS
ActionScript

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 08, 2012 Jul 08, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2012 Jul 08, 2012

Copy link to clipboard

Copied

Thanks, Ned.

The response to the trace was "undefined."

I wasn't able to find the problem, other than Flash didn't like the use of Frame Labels (it kept telling me the label didn't exist, when it did....) But Flash did like the use of the frame number. Also, I cut the layers from within gallery_mc and put them on the main timeline.

Cheers!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2012 Jul 09, 2012

Copy link to clipboard

Copied

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).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2012 Jul 10, 2012

Copy link to clipboard

Copied

Thanks. I'll for now just accept that I can get it working error-free using the frame number.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2012 Jul 10, 2012

Copy link to clipboard

Copied

LATEST

You're welcome

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines