[AS2] Preloader trick stopping on load

I’ve been going over several ways to load in my clips into background MCs. As commonly found, I can load them using MovieClipLoader into a MovieClip object in the background, but they continue to play the sounds. I created the pre-loader entirely in code using FlashDevelop and MTASC, and for some reason, container.stopAllSounds() fails to stop all sounds for that container I load the SWF into.

Anyway, I thought of a dirty workaround to get the clips to load friendly using a prototype override of the onLoad event.


        MovieClip.prototype.onLoad = function() {
            //trace("		Load Stopping: " + this);
            this.gotoAndStop(1);
        }

Which works fine. The MovieClip remains stopped on frame 1, no sounds, no problem. That is until I want to play the clip later. If I have a button on the loaded movie that calls play() or gotoAndPlay(1), it will play, but if I call container.play(), or container.gotoAndPlay(1), it never starts up the clip. Of course, I could put a button on every clip and have the user click play for every slide, but that’s tedious and not very flow worthy. I simply want to hide the current slide and show the next one in the array (which works) then I want to play it… but it’s not being friendly.

For the sake of sanity, I’m not pasting my entire code here, as it’s 3 AS files averaging 100 lines each. Needless to say, the problem lies somewhere after the creation on the empty MovieClip, hiding it, the loading of the swf, and stopping it onload. I think it has to do with the container clip that was loaded into not passing the play() call properly. I should have enough info in the post if you truly understand what’s going on… let me know! :hangover: