# (MX 6) function scope

**URL:** https://forum.kirupa.com/t/mx-6-function-scope/34514
**Category:** flash
**Created:** [November 3, 2003, 3:02pm UTC](https://forum.kirupa.com/t/mx-6-function-scope/34514 "2003-11-03T15:02:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![t8024328](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@t8024328](https://forum.kirupa.com/u/t8024328)
#### Post date: [November 3, 2003, 3:02pm UTC](https://forum.kirupa.com/t/mx-6-function-scope/34514/1 "2003-11-03T15:02:39Z")

</div>

is that possible to call a function which belong to another swf file ?

I use loadmovie to load a movie(called: movie2) in another movie (movie1).  
Movie1 contains a function that I want to be accessible from movie2.  
How can I do that ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 3, 2003, 5:04pm UTC](https://forum.kirupa.com/t/mx-6-function-scope/34514/2 "2003-11-03T17:04:31Z")

</div>

If the function is located in the \_root of movie1, just use \_root.theFunction (). But it depends on your structure, really. If you still have problems, \_global functions may help, but it’s not really a good practice…

pom 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 4, 2003, 3:08pm UTC](https://forum.kirupa.com/t/mx-6-function-scope/34514/3 "2003-11-04T15:08:37Z")

</div>

It does not work.

The function in the 1st fla file is in a movie clip object (clip7).

I want to call it from another fla (swf when publi…) and the call function is in a movie lcip(clip8) as well.  
Should I use clip7.nameofthefunction(); ?
