# Calling a function on a loaded clip?

**URL:** <https://forum.kirupa.com/t/calling-a-function-on-a-loaded-clip/191087>\
**Category:** flash\
**Created:** [June 17, 2006, 12:29am UTC](https://forum.kirupa.com/t/calling-a-function-on-a-loaded-clip/191087 "2006-06-17T00:29:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Brown\_Cow](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@The\_Brown\_Cow](https://forum.kirupa.com/u/The_Brown_Cow)\
**Post date:** [June 17, 2006, 12:29am UTC](https://forum.kirupa.com/t/calling-a-function-on-a-loaded-clip/191087/1 "2006-06-17T00:29:46Z")

</div>

So I can load in a movieclip fine, using MovieClipLoader. What I don’t understand is how to access variables in the loaded clip, or, more importantly, how to call a function on the loaded clip.

Here’s what I have as a test:

```auto
var game_mc = _root.createEmptyMovieClip("game_mc", 0);
loader = new MovieClipLoader();
loader.addListener(this);
loader.onLoadComplete = function(target) {
	trace(game_mc.testnum);
}
loader.loadClip("games/test.swf", game_mc);

```

testnum is defined as 5 in test.swf by:  
_this.testnum = 5;_

But it comes up as undefined. Is it possible to do this?
