# Calling a function on maintimeline from class

**URL:** https://forum.kirupa.com/t/calling-a-function-on-maintimeline-from-class/286583
**Category:** flash
**Created:** [April 17, 2009, 9:39am UTC](https://forum.kirupa.com/t/calling-a-function-on-maintimeline-from-class/286583 "2009-04-17T09:39:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AeonAnimation](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@AeonAnimation](https://forum.kirupa.com/u/AeonAnimation)
#### Post date: [April 17, 2009, 9:39am UTC](https://forum.kirupa.com/t/calling-a-function-on-maintimeline-from-class/286583/1 "2009-04-17T09:39:17Z")

</div>

How do i go about calling a function in frame 1 of my timeline \*\*from a class \*\*file?

my function \*\*TEST \*\*on frame one of main timeline is just using a trace.

[SIZE=2]This is my error:

1061: Call to a possibly undefined method TEST through a reference with static type flash.displayisplayObject.

[/SIZE]
