Play once and stop loaded movie

Method 1) Create an empty movie clip symbol on the stage. Right click it and open the actions panel… Apply these actions…

onClipEvent (enterFrame) {
	if (_root.containerMC._currentframe == _root.containerMC._totalframes) {
		_root.containerMC.stop();
	}
}

Method 2) (Flash MX only)… Apply these actions to the frame your movie loads on.

_root.createEmptyMovieClip("checkFrame", 1);
_root.checkFrame.onEnterFrame = function() {
	if (_root.containerMC._currentframe == _root.containerMC._totalframes) {
		_root.containerMC.stop();
	}
};

thanks I will give it a try.

2 Questions to clarify:

In method 1) containerMC is the "emptyMC symbol I ahve already created to which the exteral swf’s are loaded…

In method 2) Checkframe is the empty clip and containerMC is the external file which is loaded.

Thank you for providing so much help:)

In Method One, the empty movie clip is actually a seperate movie clip than the one you load on.

But now that I think if it, I am not sure if it will work if you apply the code to the clip on the stage you are loading too… Interesting… I never thought about it. It is worth a try :slight_smile:

In Method Two, “checkFrame” is the instance name of the empty movie clip dynamically created.

Then _root.checkFrame.onEnterFrame = function() creates an event handler for the checkFrame movie clip. In this case, the event is the onEnterFrame.

I would loadMovie to "checkFrame’ correct:)

Yeah, but if the if statement doesn’t work, try loading the movie the same way you are now.

I will.
Be back later with an update
Thanks again =)

No problem, I hope it works. If not, then try just putting the if statement on the frame isntead of in an onEnterFrame.