# Calling a function in a different timeline

**URL:** https://forum.kirupa.com/t/calling-a-function-in-a-different-timeline/262302
**Category:** Uncategorized
**Created:** [June 4, 2008, 8:26pm UTC](https://forum.kirupa.com/t/calling-a-function-in-a-different-timeline/262302 "2008-06-04T20:26:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![0L4F](https://avatars.discourse-cdn.com/v4/letter/0/848f3c/32.png) [@0L4F](https://forum.kirupa.com/u/0L4F)
#### Post date: [June 4, 2008, 8:26pm UTC](https://forum.kirupa.com/t/calling-a-function-in-a-different-timeline/262302/1 "2008-06-04T20:26:12Z")

</div>

Hello all, I’m new to as3 and new to this forum, making my first steps in migrating from as2.

I have a question that I can’t seem to get my head around: I want to call a function that’s on another timeline.  
Let’s say I have two MovieClips on the main timeline, called **Movie1** and **Movie2**. In Movie1’s timeline I defined a function called MyFunction().  
Now I want to call this function from Movie2. In as2 I used to do this:

- this.\_parent.Movie1.MyFunction();\*

In as3, I can’t get this to work. I tried casting:

- MovieClip(this.parent.Movie1).MyFunction();\*

but that won’t do it. I have a feeling I’m doing something very basic very wrong! Any help would be greatly appreciated!

Thanks, 0.

---

<div class="post-metadata">

### Author: ![0L4F](https://avatars.discourse-cdn.com/v4/letter/0/848f3c/32.png) [@0L4F](https://forum.kirupa.com/u/0L4F)
#### Post date: [June 11, 2008, 2:37pm UTC](https://forum.kirupa.com/t/calling-a-function-in-a-different-timeline/262302/2 "2008-06-11T14:37:57Z")

</div>

Thank you [LordMoyne](http://www.kirupa.com/forum/member.php?u=65953) for taking the time to answer this beginner’s question… I had a feeling that this was where I was going wrong. Though I’m afraid it’ll just spawn more questions, which I’ll bring up in a new thread…

Much appreciated,

1.
