# Global functions question

**URL:** https://forum.kirupa.com/t/global-functions-question/257709
**Category:** flash
**Created:** [April 16, 2008, 3:01pm UTC](https://forum.kirupa.com/t/global-functions-question/257709 "2008-04-16T15:01:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![11119](https://avatars.discourse-cdn.com/v4/letter/1/6bbea6/32.png) [@11119](https://forum.kirupa.com/u/11119)
#### Post date: [April 16, 2008, 3:01pm UTC](https://forum.kirupa.com/t/global-functions-question/257709/1 "2008-04-16T15:01:37Z")

</div>

I was wondering something to do with global functions, it seems if you declare a function as global inside the first frame of a movieclip…and try call it from the first frame of the \_root timeline it does not work.

Example.

This code is in a movieclip on the first frame of the timeline called “my\_mc”;

```auto

_global.Test = function(){
trace("Test ok!");
}

```

Then the code on the main timeline, first frame would be a call like this.

```auto

Test();

```

I know this is very simple, but it does not work. Could someone explain this for me?

Thanks 🙂
