# Problem in calling function

**URL:** <https://forum.kirupa.com/t/problem-in-calling-function/288321>\
**Category:** flash\
**Created:** [May 14, 2009, 6:50am UTC](https://forum.kirupa.com/t/problem-in-calling-function/288321 "2009-05-14T06:50:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamikaze5141](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@kamikaze5141](https://forum.kirupa.com/u/kamikaze5141)\
**Post date:** [May 14, 2009, 6:50am UTC](https://forum.kirupa.com/t/problem-in-calling-function/288321/1 "2009-05-14T06:50:05Z")

</div>

package com.games.flashgames.common {  
import flash.display._;  
import flash.events._;

```
public class Title extends MovieClip {
    
        startButton.addEventListener(MouseEvent.CLICK, startButtonClicked);

```

}

```
    private function startButtonClicked(mouseEvent:MouseEvent):void {
        Object(parent).showHighScores();
    }    
}

```

the code works fine , but actually i want the “Object(parent).showHighScores();” to be load automatically without clicking the button (auto call the function once the page loaded), i tried use Event.Enter\_frame but it wont stop running, can u help me ?
