# Can't get to functions inside movie clips!

**URL:** <https://forum.kirupa.com/t/cant-get-to-functions-inside-movie-clips/220110>\
**Category:** flash\
**Created:** [March 22, 2007, 7:48pm UTC](https://forum.kirupa.com/t/cant-get-to-functions-inside-movie-clips/220110 "2007-03-22T19:48:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seversky](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@seversky](https://forum.kirupa.com/u/seversky)\
**Post date:** [March 22, 2007, 7:48pm UTC](https://forum.kirupa.com/t/cant-get-to-functions-inside-movie-clips/220110/1 "2007-03-22T19:48:38Z")

</div>

I hope someone here can help me out… I have a function inside a movie clip, and I want to call that function from other functions on the main timeline. However, no matter what I do, I cannot seem to call the function unless I put the function call in an onLoad event handler. Here is a simplified example of what I want to do:

## “myMC” Movie Clip: Actions Layer

function myFunction() { trace(“hello world”); } /// define function in movie clip

## Main Timeline: Actions Layer

myMC.myFunction(); /// call function in myMC movie clip

When I run the movie, nothing happens, but if I call this function in an “onLoad” event handler, it works. Why is that? I need to be able to call the function from within other functions, not just the “onLoad” event handler :crying:. Does anyone know how I can do this?

edit: added comments to clarify 😏
