# How to call functions in another swf

**URL:** https://forum.kirupa.com/t/how-to-call-functions-in-another-swf/192629
**Category:** Uncategorized
**Created:** [June 29, 2006, 9:52pm UTC](https://forum.kirupa.com/t/how-to-call-functions-in-another-swf/192629 "2006-06-29T21:52:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![craiginlimbo](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@craiginlimbo](https://forum.kirupa.com/u/craiginlimbo)
#### Post date: [June 29, 2006, 9:52pm UTC](https://forum.kirupa.com/t/how-to-call-functions-in-another-swf/192629/1 "2006-06-29T21:52:39Z")

</div>

Hi

I am trying to figure out how to call a function in one swf from another swf both of which are loaded into the same master swf.

This is my function in workPhoto.swf which is loaded into level 5 of the master.swf:

```auto
function killThumbs() {
	image_mcl.unloadClip(thumbnail_mc);
}

```

I want to call this function when I click on a menu item in another swf called listMenu.swf

```auto
curr_item.onPress = function(){
			//I want to call the function from here 
		};
		
		curr_item.onRelease = function(){
			Actions[this.action](this.variables);
		};

```

I want to call the function from the onPress so that the onRelease can perform the XML load (which currently works fine).

I tried sticking \_level5.image\_mcl.unloadClip(thumbnail\_mc); into the onPress function, but to no avail. It seems that the function needs to be run from inside the movie.

Any suggestions?
