# Calling a function within a MC

**URL:** https://forum.kirupa.com/t/calling-a-function-within-a-mc/260835
**Category:** flash
**Created:** [May 20, 2008, 1:03pm UTC](https://forum.kirupa.com/t/calling-a-function-within-a-mc/260835 "2008-05-20T13:03:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gregmax](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gregmax](https://forum.kirupa.com/u/gregmax)
#### Post date: [May 20, 2008, 1:03pm UTC](https://forum.kirupa.com/t/calling-a-function-within-a-mc/260835/1 "2008-05-20T13:03:45Z")

</div>

Quick question, and hopefully someone has a quick answer. Is it possible to call a function that is sitting on he MainTimeline from inside a MC that is sitting on the stage? I have looked on the web and found that AS3 doesn’t use globals anymore ☹ . So I was hoping that someone here could help me think of a workaround. Thanks

---

<div class="post-metadata">

### Author: ![gregmax](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gregmax](https://forum.kirupa.com/u/gregmax)
#### Post date: [May 20, 2008, 1:12pm UTC](https://forum.kirupa.com/t/calling-a-function-within-a-mc/260835/2 "2008-05-20T13:12:22Z")

</div>

Many apologizes… it must be too early or something, probably just me. I did some more googling and found the solution. You need to pass the MainTimeline/stage as a MovieClip

[AS]  
MovieClip(parent).function\_to\_execute();  
[/AS]
