Can't get to functions inside movie clips!

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 :smirk: