Loading external swf problem Help needed!

Hello Action script gurus

It’s me again with more help needed. I’ll start by pasting the code
i’ve been working on

gotoAndStop(10);
_root.currMovie = “salon”;
container.loadMovie(_root.currMovie+".swf");
salonbtn.onRelease = function() {
_root.target1 = 0;
_root.target2 = 30.5;
if (_root.currMovie == undefined) {
_root.currMovie = “salon”;
_root.container.loadMovie(“salon.swf”);
} else if (_root.currMovie != “salon”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “salon”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(11);
};
gallerybtn.onRelease = function() {
_root.target1 = -650;
_root.target2 = 112.5;
if (_root.currMovie == undefined) {
_root.currMovie = “gallery”;
_root.container.loadMovie(“gallery.swf”);
} else if (_root.currMovie != “gallery”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “gallery”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(20);
};
productsbtn.onRelease = function() {
_root.target1 = -1300;
_root.target2 = 205;
if (_root.currMovie == undefined) {
_root.currMovie = “products”;
_root.container.loadMovie(“products.swf”);
} else if (_root.currMovie != “products”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “products”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(30);
};
locationbtn.onRelease = function() {
_root.target1 = -1950;
_root.target2 = 312.5;
if (_root.currMovie == undefined) {
_root.currMovie = “location”;
_root.container.loadMovie(“location.swf”);
} else if (_root.currMovie != “location”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “location”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(40);
};
enquiriesbtn.onRelease = function() {
_root.target1 = -2600;
_root.target2 = 417.5;
if (_root.currMovie == undefined) {
_root.currMovie = “enquiries”;
_root.container.loadMovie(“enquiries.swf”);
} else if (_root.currMovie != “enquiries”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “enquiries”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(50);
};
stylebtn.onRelease = function() {
_root.target1 = -3250;
_root.target2 = 514.5;
if (_root.currMovie == undefined) {
_root.currMovie = “style”;
_root.container.loadMovie(“style.swf”);
} else if (_root.currMovie != “style”) {
if
(_root.container._currentframe>=_root.container.midframe) {
_root.currMovie = “style”;
_root.container.play();
}
}
trace(_root.currMovie);
//gotoAndStop(50);
};
bg1.onEnterFrame = function() {
bg1Pos = bg1._x;
xDiff = _root.target1-bg1Pos;
bg1._x += xDiff0.1;
if (bg1Pos == target1) {
bg1Stopped = 1;
} else if (bg1Pos != target1) {
bg1Stopped = 0;
}trace(bg1Pos);
trace(target1)
};
bH.onEnterFrame = function() {
bHPos = bH._x;
xDiff = _root.target2-bHPos;
bH._x += xDiff
0.1;
if (bHPos == target2) {
bHstopped = 1;
} else if (bHPos != target2) {
bHStopped = 0;
}
};

And now here is a link to the website online so you have some idea
what i’m talking about.

[COLOR=#810081]http://www.david-grey.com/jhsalonflash/body.html[/COLOR]

The problem is if you quickly switch between the links at the bottom
then the loadMovie can’t keep up. I think i’ve worked this out to be
that the background and the button highlighter are still moving too
much. I wanted to implement a flag where i would only load the movie
if the background (bg1) equaled the target posistion.

The problem is that the target never quite equals the background
posistion as i’ve found out by tracing the two variables. If i can
somehow get it to load the movie when the background stops moving it
would be perfect.

If you know of any other way to make this work i’d be very greatful as
there is no body else I can ask.

Thanks in advance

David Grey