So I have a current flash file that has external swf’s loading into a “container” clip. Inside those swf’s are dynamically loading jpegs. All of this is working really smoothly except for the problem that the jpegs are a little bit too big(kb) and take a while to load. So you press a button and wait for a while then the image pops up. So what I want to do is use the preloader I created for my swfs --the link the preloader I am using is here—>>http://www.actionscript.org/resource…der/Page1.html
Is there any way to add the same preloader to my dynamically loading images?? Here is the code I have for my dynamically loading images, *Thanks to Stringy
myarray = [];
btnarray = [];
var count = 0;
var p = mc1.mc.createEmptyMovieClip(“p”, 1);
var q = mc2.mc.createEmptyMovieClip(“p”, 1);
mc = mc1;
oldmc = mc2;
//you would get this from xml -easy peasy
for (var i = 1; i<7; i++) {
myarray.push(“http://www.myserverhere.com/p"+i+".png”);
this[“btn”+i].ivar = i-1;
this[“btn”+i].onPress = presto;
btn1.onPress()
btnarray.push(this[“btn”+i]);
}
function checkload() {
dis(false)
onEnterFrame = function () {
if (mc.mc.p._width) {
mc.swapDepths(oldmc);
mc.gotoAndPlay(2);
delete this.onEnterFrame;
oldmc.onEnterFrame = fade
}
};
}
function fade(){
if(this._alpha>0){
this._alpha -=25
}else{
this._alpha = 0
delete this.onEnterFrame
var myvar = mc;
mc = oldmc;
oldmc = myvar;
dis(true)
}
}
function f() {
mc._alpha = 100
mc.mc.p.loadMovie(myarray[count]);
checkload();
count++;
count %= myarray.length;
}
function presto() {
count = this.ivar;
f();
}
function dis(v){
for (var i = 0; i<btnarray.length; i++) {
btnarray*.enabled =v
}
}
Thanks,
–M