# Been Having alot of problems with this bit of code could anyone help?

**URL:** <https://forum.kirupa.com/t/been-having-alot-of-problems-with-this-bit-of-code-could-anyone-help/329720>\
**Category:** Uncategorized\
**Created:** [October 6, 2012, 5:44pm UTC](https://forum.kirupa.com/t/been-having-alot-of-problems-with-this-bit-of-code-could-anyone-help/329720 "2012-10-06T17:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Didd](https://avatars.discourse-cdn.com/v4/letter/o/ec9cab/32.png) [@Oliver\_Didd](https://forum.kirupa.com/u/Oliver_Didd)\
**Post date:** [October 6, 2012, 5:44pm UTC](https://forum.kirupa.com/t/been-having-alot-of-problems-with-this-bit-of-code-could-anyone-help/329720/1 "2012-10-06T17:44:46Z")

</div>

Ive working on this error for quite some time and i have no clue on why it just isnt working before i had the error code 5000 but that has disappeared when i decided to write in the full code and now i get the 1126 error code for lines 24 and 29,

package  
{  
import flash.display.MovieClip;  
import flash.events.MouseEvent;

```
public class Main extends MovieClip
{
    var startPage:Startpage;
    var hillPage:HillPage;
    var pondPage : PondPage;
    
    public function Main()
    {
        startPage = new startPage;
        hillPage = new HillPage();
        pondPage = new PondPage();
        addChild(startPage);
        
        //Event Listeners
        startPage.hillButton.addEventListener(MouseEvent.CLICK, onHillButtonClick);
        startPage.pondButton.addEventListener(MouseEvent.CLICK, onPondButtonClick);
    }
    //Event Handlers
    function onHillButtonClick(event:MouseEvent):void
            
            addChild(hillPage);
            removeChild(startPage);
    
    function onPondButtonClick(event:MouseEvent):void
            
            addChild(pondPage);
            removeChild(startPage);
    }
}
```
