# Simple function call

**URL:** https://forum.kirupa.com/t/simple-function-call/270616
**Category:** Uncategorized
**Created:** [September 11, 2008, 4:14pm UTC](https://forum.kirupa.com/t/simple-function-call/270616 "2008-09-11T16:14:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jasotasticon](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jasotasticon](https://forum.kirupa.com/u/jasotasticon)
#### Post date: [September 11, 2008, 4:14pm UTC](https://forum.kirupa.com/t/simple-function-call/270616/1 "2008-09-11T16:14:47Z")

</div>

I am new to AS3 and I know this is probably obvious but…

I want to call a function I defined on the main timeline from inside a movie clip instance.

here is my function:

function imAFunction():void  
{  
trace(“I am a function wheeeee!”);  
}

inside the timeline of a movie clip I have tried to call it in all sorts of ways

root.imAFunction();  
this.stage.imAFunction();  
this.parent.imAFunction();  
etc etc

but I keep getting this error:

1061: Call to a possibly undefined method imAFunction through a reference with static type flash.displayObject.
