# AS 3 Problem

**URL:** <https://forum.kirupa.com/t/as-3-problem/230521>\
**Category:** flash\
**Created:** [June 26, 2007, 10:21pm UTC](https://forum.kirupa.com/t/as-3-problem/230521 "2007-06-26T22:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![macmar](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@macmar](https://forum.kirupa.com/u/macmar)\
**Post date:** [June 26, 2007, 10:21pm UTC](https://forum.kirupa.com/t/as-3-problem/230521/1 "2007-06-26T22:21:44Z")

</div>

In Scene 1 I have a movie clip called “mask.” In this movie clip on the A (actions) layer this AS resides:  
parent.gotoAndStop(parent.nextSection);

In Scene 1 on the actions layer this AS resides:  
stop();

var nextSection:String;

function onHomeClick(evt:MouseEvent):void {  
nextSection = “home”  
transition.play();  
}  
btn\_home.addEventListener(MouseEvent.CLICK, onHomeClick);

function onMenuClick(evt:MouseEvent):void {  
nextSection = “menu”  
transition.play();  
}  
btn\_menu.addEventListener(MouseEvent.CLICK, onMenuClick);

I get the Compiler Errors Window saying:

Location: “mask,” layer A…  
Description: 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObjectContainer.  
Source: parent.gotoAndStop(parent.nextSection);

Location: “mask,” layer A…  
Description: 1119: Access of possibly undefined property nextSection through a reference with static type flash.display:DisplayObjectContainer.  
Source: parent.gotoAndStop(parent.nextSection);

Can anyone tell me what is wrong? If you can help me, please speak on a very basic level since I am new o CS 3 and very bad at AS. Thanks!
