Navigation on multiple external swf files

Hello everyone,

I have a file (main.fla) which loads external movieclips on it,using an empty movieclip as loader (loader_mc).Now,I want to create a navigation,with two buttons (previous / next) which will allow me to navigate through the external movieclips.
So,I have created these two buttons.For the “next” button I am using this code,to load the first external swf file (example1.swf):

on (release) {
	if(this._parent.loader == Number(this._parent.loader_mc)){
		loadMovieNum("example1.swf",this._parent.loader_mc);
	} else {
		this._parent.loader_mc.loadMovie("example1.swf");
	}
}

This is a simple code,taken from the behavior.
So,everything is fine till now.The first ext.swf loads correctly.
Now,what code do I need to use,in order to be able to load the second ext.swf file (example2.swf) when the “next” button is clicked?

Thanks in advance =)

Anyone?

dont put code in the movieclips.
add it in the timeline.

var currPage:Number = 1

next_btn.onRelease = function(){
	currPage++
	loadMovieNum("example"+currPage+".swf",this._parent.loader_mc);
}


this it?

Hello,thanks for your answer pantas.
It does work,although when I click the “next” button,it loads the swf on my browser,and not inside my flash movie.

??? you serious?

hmm…never seen that happen lol.

ok my mistake

try this


var currPage:Number = 1

next_btn.onRelease = function(){
	currPage++
	this._parent.loader_mc.loadMovie("example"+currPage+".swf",this._parent.loader_mc.getNextHighestDepth());
}

this._parent.loader_mc - i dont know if this is the correct path … check it out