Loading swf AS help please!

HEEEELLLLPPPP!!! :slight_smile: I was fine until i added the container clip to have the “in and out” effect on the external swfs. I just dont know where to put the container clip code and function (in red) within all the other code. Any help would be awesome as I am a novice anctionscriptor. Here’s my AS:


stop();
[COLOR=firebrick]container.loadMovie(_root.currMovie+".swf");[/COLOR] 

// 
// your button is in fact a movie clip with 3 frames
// frame 1 is normal state
// frame 2 is over state
// frame 3 is visited state
// name your buttons button1, button2, button3 and so on...
// 
total = 14;
// number of buttons
movies_array = ["pic1.swf", "pic2.swf", "pic3.swf","pic4.swf","pic5.swf","pic6.swf","pic7swf","pic8swf","pic9.swf","pic10.swf","pic11.swf","pic12.swf","pic13.swf","pic14.swf","pic15.swf","pic16.swf","pic17.swf","pic18.swf","pic19.swf","pic20.swf","pic21.swf","pic22.swf","pic23.swf","pic24.swf","pic25.swf","pic26.swf","pic27.swf","pic28.swf","pic29.swf","pic30.swf"];
// array containing the movies
this.onEnterFrame = function() {
	for (var i = 1; i<=total; i++) {
		if (this["button"+i]._currentframe != 3) {
			if (this["button"+i].hitTest(_xmouse, _ymouse, false)) {
				this["button"+i].gotoAndStop(2);
			} else {
				this["button"+i].gotoAndStop(1);
			}
		}
	}
};
for (var i = 1; i<=total; i++) {
	this["button"+i].temp = i-1;
	this["button"+i].onPress = function() {
		
[COLOR=firebrick]	if (_root.currMovie == undefined) {
		_root.currMovie = "pic1";
		container.loadMovie("pic1.swf");
	} else if (_root.currMovie != "pic1") {
		if (container._currentframe >= container.midframe) {
			_root.currMovie = "pic1";
			container.play();
		}
	}

[/COLOR]

		loadMovieNum(movies_array[this.temp], 100);
		this.gotoAndStop(3);
	};
}

*Placed your script inbetween AS tags - Voetsjoeba.