# Function calling

**URL:** <https://forum.kirupa.com/t/function-calling/83473>\
**Category:** Uncategorized\
**Created:** [March 19, 2005, 6:58am UTC](https://forum.kirupa.com/t/function-calling/83473 "2005-03-19T06:58:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nocturn](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Nocturn](https://forum.kirupa.com/u/Nocturn)\
**Post date:** [March 19, 2005, 6:58am UTC](https://forum.kirupa.com/t/function-calling/83473/1 "2005-03-19T06:58:19Z")

</div>

Why are the simplest things so obscure in actionscript…

I would like to know, how do you call a function that is inside another movieclip?

Do global functions have to be declared on the root?

I’m trying to do a very simple thing, take the grid tutorial and apply it as a mask to an image. Everything works ok, now I would like to call the function that makes the grid after the pic has loaded.

So I have on the root:  
mc\_picholder  
mc\_boxholder \<—This mc contains the function that makes little boxes

I can assign the mc\_boxholder as a mask to the mc\_picholder and this works fine.

Now say I have a function in mc\_boxholder called makeboxes(), and I want to call it from the root once a pic has finished loading into mc\_picholder.

All the functions to make the boxes are inside the mc\_boxholder. I’ve tried declaring makeboxes as global, and calling it from the root, doesn’t work.

I’ve tried tried writing from root: mx\_boxholder.makeboxes(), doesn’t work either…

Would appreciate any help on how to handle these types of situations where you need to call functions on different movieclips from different locations.
