Hopefully can help cos im at a loss!!!
I making a web site that has a main disply window and when a button is clicked an aimation plays and which displys an external swf file. I have put a preloader at the end of the animation so when a button is clicked the animation plays and the preloader appears, once this has loaded the external swf file appears displying the information (in this case pictures) but how its working at the moment is that a button is clicked and the animation frezes on the first frame (as the external swf file is loading in the background) once it has loaded the animation plays and the screen is disaplyed.
So it seems to be running in the wrong order it should be button, animation, preloader, external swf
but at present its running in the wrong order button, preloader (which doesnt display as its stuck on the 1st frame of the animation), amination, external swf.
Hopefully this makes sense and you can help
Actions script below:
var btnArray = [btn0, btn1, btn2, btn3, btn4, btn5, btn6];
var currBtn = btnArray[0]._name;
//
var mcLoader = new MovieClipLoader();
var mclListener = new Object();
mclListener.onLoadInit = function() {
transMC.num = 0;
transMC.onEnterFrame = function() {
if (this._currentframe == this.num) {
this.gotoAndPlay(“in”);
delete this.onEnterFrame;
} else {
this.num = this._currentframe;
}
};
};
mcLoader.addListener(mclListener);
function doPress(mc) {
transMC.id = (mc == undefined) ? this._name : mc;
if (transMC.id != currBtn) {
currBtn = transMC.id;
if (transMC.onEnterFrame == undefined) {
transMC.gotoAndPlay(“out”);
transMC.num = 0;
transMC.onEnterFrame = function() {
if (this._currentframe == this.num) {
mcLoader.loadClip(this.id + “.swf”,contentMC);
delete this.onEnterFrame;
} else {
this.num = this._currentframe;
}
};
}
}
}
//
for (i in btnArray) {
myBtn = btnArray*;
myBtn.dispTxt.text = myBtn._name;
myBtn.onPress = doPress;
}