# Navigation on multiple external swf files

**URL:** <https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788>\
**Category:** Uncategorized\
**Created:** [June 30, 2008, 3:37pm UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788 "2008-06-30T15:37:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zenor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zenor/32/3634_2.png) [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Post date:** [June 30, 2008, 3:37pm UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788/1 "2008-06-30T15:37:56Z")

</div>

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):

```auto
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 =)

---

<div class="post-metadata">

**Author:** ![Zenor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zenor/32/3634_2.png) [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Post date:** [July 1, 2008, 9:18am UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788/2 "2008-07-01T09:18:40Z")

</div>

Anyone?

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [July 1, 2008, 3:53pm UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788/3 "2008-07-01T15:53:46Z")

</div>

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

```auto
var currPage:Number = 1

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

```

this it?

---

<div class="post-metadata">

**Author:** ![Zenor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zenor/32/3634_2.png) [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Post date:** [July 2, 2008, 7:05am UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788/4 "2008-07-02T07:05:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [July 2, 2008, 2:14pm UTC](https://forum.kirupa.com/t/navigation-on-multiple-external-swf-files/264788/5 "2008-07-02T14:14:09Z")

</div>

??? you serious?

hmm…never seen that happen lol.

ok my mistake

try this

```auto

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
