# Problems with making functions

**URL:** <https://forum.kirupa.com/t/problems-with-making-functions/252778>\
**Category:** Uncategorized\
**Created:** [February 23, 2008, 10:55am UTC](https://forum.kirupa.com/t/problems-with-making-functions/252778 "2008-02-23T10:55:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [February 23, 2008, 10:55am UTC](https://forum.kirupa.com/t/problems-with-making-functions/252778/1 "2008-02-23T10:55:53Z")

</div>

Lets say i want to make a function for a MC.  
in frame1:  
[AS]  
function mess = function (text){  
trace (text);  
}  
[/AS]

To call this function from inside a MC i need to write like this:  
[AS]  
\_root.mess(“Hello World”)  
[/AS]

But since my final movie is loaded with a preloader in another file, that function is placed on another location, so to call the function from a MC, i need to write:  
[AS]  
\_parent.mess(“Hello World”)  
[/AS]

This bothers me.  
How would you make a functions that is “global”? Where all you have to write is:  
[AS]  
mess(“hello world”)  
[/AS]
