# I'm an idiot. Tack on to my simple load script

**URL:** <https://forum.kirupa.com/t/im-an-idiot-tack-on-to-my-simple-load-script/139393>\
**Category:** Uncategorized\
**Created:** [March 2, 2005, 6:26pm UTC](https://forum.kirupa.com/t/im-an-idiot-tack-on-to-my-simple-load-script/139393 "2005-03-02T18:26:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xMetal](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xMetal](https://forum.kirupa.com/u/xMetal)\
**Post date:** [March 2, 2005, 6:26pm UTC](https://forum.kirupa.com/t/im-an-idiot-tack-on-to-my-simple-load-script/139393/1 "2005-03-02T18:26:40Z")

</div>

I know this has been on here about 800 million times, but I can’t get this simple loading script to work with a basic preload function. All I need is to alter this a bit so that it can check on the status of the loaded file and wait until it’s done to move along, but I can’t get it to work.

I’m far from a flash newbie, and feel like a real idiot, so I beg for help.

There is a blank MC being used to load into. The external filenames are stored in a basic array. The files load fine, but I just need to get the check in there so the timeline waits until the file is loaded.

```auto
count=0;

function preLoad(Target) {
        var newLoader = "loader"+count;
        _root.loader.duplicateMovieClip(newLoader, count+2);
        _root[newLoader].loadMovie(Target);
}

```

on frame 1. On frame 3 we call it:

```auto
preLoad(fileNames[0]);

```

I just need it to wait until that’s complete to move forward. Gimme a hand fellas!
