onClipEvent(load)

Hi

I have a movie clip which has the following code attached to it:


onClipEvent (load) {
    System.security.allowDomain("http://www.url.com");
    this.loadMovie("http://www.url.com/clip1.swf");

    if (this.getBytesLoaded() == this.getBytesTotal()) {
        // code to execute
        trace('here');
        delete this.onLoad;
    }
}

The problem is that I get an infinite loop, which I understand is correct for onClipEvent, but which I don’t want. The external movie loads fine, and I get trace from it, as well as a lot of ‘here’ output.
I would like the loop to stop once the movie has loaded. Also, I would prefer the script to be attached to the clip and not to a frame as I would like to replicate this for three other external movies, and the neater it is the better.

Does anyone have any ideas?