Skip to main content
Participating Frequently
November 7, 2010
Answered

Error 1120 - Correct format for sub-nesting?

  • November 7, 2010
  • 1 reply
  • 697 views

I have a slideshow (graphicsshow_mc) within a navigation menu (graphicsmenu_mc) - a movieclip nested in a movieclip.  There are previous / next buttons inside the slideshow that work correctly.

Example:

prev_btn02.addEventListener(MouseEvent.CLICK, navBack02);
function navBack02(event:MouseEvent):void {
    gotoAndStop("deinonychus")
}

The navigation menu acts like chapters for a DVD, and I want one button to always go to the beginning.  I copied the other code, but need it modified to reflect that it appears in the parent.

dino_btn.addEventListener(MouseEvent.CLICK, showStart);
function showStart(event:MouseEvent):void {
    gotoAndStop(graphicsshow_mc.("deinonychus"));
}


The problem is I don't know the correct formatting.  All the tutorials and examples I've found are slightly differen from what I need.  I feel like I've tried all sorts of variations with parenthesis, commas, periods, quotes and just can't get it to work.  Everything is named correctly, and spelling in the code was always copy/pasted to ensure continuity.

I'm new with all this, so if someone could hook me up with the correct format, that would help lessen my headache.

**Error** Symbol 'mc_dropdown', Layer 'actions', Frame 19, Line 3:1120: Access of undefined property dino_btn.

dino_btn.addEventListener(MouseEvent.CLICK, showStart);

This topic has been closed for replies.
Correct answer Ned Murphy

If the following line is in the timeline that contains graphicsshow_mc,

     gotoAndStop(graphicsshow_mc.("deinonychus"));

  

and the purpose is to have graphicsshow_mc gotoAndStop at the frame labelled deinonychus, then that line should be...

     graphicsshow_mc.gotoAndStop("deinonychus");

As for the 1120 error, if it remains after fixing that, there may be some naming issue with the button.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
November 7, 2010

If the following line is in the timeline that contains graphicsshow_mc,

     gotoAndStop(graphicsshow_mc.("deinonychus"));

  

and the purpose is to have graphicsshow_mc gotoAndStop at the frame labelled deinonychus, then that line should be...

     graphicsshow_mc.gotoAndStop("deinonychus");

As for the 1120 error, if it remains after fixing that, there may be some naming issue with the button.

Participating Frequently
November 7, 2010

No sorry, the string of code

dino_btn.addEventListener(MouseEvent.CLICK, showStart);
function showStart(event:MouseEvent):void {
    gotoAndStop(graphicsshow_mc.("deinonychus"));
}

is in the graphicsmenu_mc timeline which subsequently contains graphicsshow_mc.

Ned Murphy
Legend
November 7, 2010

You just confirmed what I said, so I don't know why you disagree.