# Calling a function on the timeline from a class

**URL:** <https://forum.kirupa.com/t/calling-a-function-on-the-timeline-from-a-class/285910>\
**Category:** flash\
**Created:** [April 7, 2009, 7:04pm UTC](https://forum.kirupa.com/t/calling-a-function-on-the-timeline-from-a-class/285910 "2009-04-07T19:04:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RossKidd](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@RossKidd](https://forum.kirupa.com/u/RossKidd)\
**Post date:** [April 7, 2009, 7:04pm UTC](https://forum.kirupa.com/t/calling-a-function-on-the-timeline-from-a-class/285910/1 "2009-04-07T19:04:02Z")

</div>

in my menuButton class I add an eventlistener but moveAlong is on the main timeline how do I call it?

public function menuButtons():void  
{

addEventListener(MouseEvent.CLICK, moveAlong);

```
    }
```
