Lots of links

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.


var nextMovie = 0

this.i = 0;
while(this[“b” + (++this.i)]) {
this[“b” + this.i].onPress = function():Void {

delete this.i;

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