# loadMovie not working with function

**URL:** <https://forum.kirupa.com/t/loadmovie-not-working-with-function/157335>\
**Category:** flash\
**Created:** [August 1, 2005, 8:25am UTC](https://forum.kirupa.com/t/loadmovie-not-working-with-function/157335 "2005-08-01T08:25:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crunchysocks](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@crunchysocks](https://forum.kirupa.com/u/crunchysocks)\
**Post date:** [August 1, 2005, 8:25am UTC](https://forum.kirupa.com/t/loadmovie-not-working-with-function/157335/1 "2005-08-01T08:25:42Z")

</div>

Hey,

I’m using this code

```auto

clipLoader = function (clip) {

if (_root.currMovie == undefined) {

_root.currMovie = clip;
_root.mcHolder.loadMovie(clip+ ".swf");
} else if (_root.currMovie != clip) {
if (_root.mcHolder._currentframe >= _root.mcHolder.midframe) {

_root.currMovie = clip;
_root.mcHolder.play();

}//end else

}//end if

};//end function

```

on an frame in the -root directory, and have a movieclip with the instance name on mcHolder on the stage (inside of that is a graphic of the mc, so i can set the alpha to 0 so i won’t have an ugly white outline of a box on the stage).

I call it with

```auto

clipLoader("portfolio");

```

and obviously have the correct swf’s in the folder etc…

But its not working! Usually i would use createEmptyMovieClip, but that can’t handle the things like \_currentframe… which i need 😑

Need any suggestions! Cheers 🙂
