# Lots of links

**URL:** https://forum.kirupa.com/t/lots-of-links/205708
**Category:** flash
**Created:** [November 1, 2006, 5:29am UTC](https://forum.kirupa.com/t/lots-of-links/205708 "2006-11-01T05:29:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Oli\_G](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oli\_G](https://forum.kirupa.com/u/Oli_G)
#### Post date: [November 1, 2006, 5:29am UTC](https://forum.kirupa.com/t/lots-of-links/205708/1 "2006-11-01T05:29:33Z")

</div>

Hi all

I have a container clip called ‘stage\_mc’.

Within this, A clip called ‘Australia.swf’ is loaded straight away.

This clip has 7 buttons, named b1, b2, b3 etc. What i’m trying to do is set a variable called nextMovie, whereby the value changes depending on which movie each button is pointing to.

For example - clicking b1 may remove Australia.swf form the container, and then load in ‘westAustralia.swf’. ‘westAustralia.swf’ being the swf I need to somehow attach to the relevant button.

Then westAustralia.swf has buttons of its own, and may go 2 levels deeper.

stage\_mc.loadMovie(‘Australia.swf’);

var nextMovie = 0

this.i = 0;  
while(this[“b” + (++this.i)]) {  
this[“b” + this.i].onPress = function():Void {  
\_root.stage\_mc.loadMovie(“nextMovie”+’.swf’);  
}

}  
delete this.i;

I know this code is way off. Any pointers or online examples of things achieving this simple scaleable link system?

Cheers
