I am very frustrated with my inability to get my code to work on a Mac. Basically, I have a picture gallery that loads external swf in order on top of each other. Because I didnt want to load the swf into a holder I dynamically create a movieClip on an ever increasing stack layer. Then I also destroy the layer below so the processor doesnt get overloaded. The same onRelease that creates the empty movieClip also tells a preloader to run on the root level. The preloader checks to see if the dynamically created movieClip has loaded and if so… etc.
Once again, works perfect on a PC but not on a Mac.
Any ideas why this may be??? I posted my code below for anyone who wants to take a crack at it. The thumbnails that are triggering the createEmptyMovieClip are located within the loaded “main.swf”. So the code below resides on the root layer in a “skin” that loads the actual gallery.
I have read elsewhere that putting loadMovie within a loop creates problems in Macs. Sounds like vodoo to me but at this point… I’ll try anything!
////////////////////////////////////////////////
top_loader.loadMovie(“main.swf”);
preloader.gotoAndPlay(2);
var baseDepth = -5000;
var myPics = new Array("", “main_mc_p1.swf”, “main_mc_p2.swf”, “main_mc_p3.swf”, “main_mc_p4.swf”, “main_mc_p5.swf”, “main_mc_p6.swf”, “main_mc_p7.swf”, “main_mc_p8.swf”, “main_mc_p9.swf”, “main_mc_p10.swf”, “main_mc_p11.swf”);
for (i=1; i<12; i++) {
this.top_loader[“tn”+i].onRollOver = function() {
if (!this.opened) {
if (this._currentframe != 10) {
this.gotoAndPlay(“on”);
}
}
};
this.top_loader[“tn”+i].onRollOut = function() {
if (!this.opened) {
if (this._currentframe != 10) {
this.gotoAndPlay(“off”);
}
}
};
this.top_loader["tn"+i].opened = false;
this.top_loader["tn"+i].iVal = i;
this.top_loader["tn"+i].mymovie = myPics*;
this.top_loader["tn"+i].onRelease = function() {
this.opened = true;
closeAllWinders(this.iVal);
//creates picture holder
baseDepth++;
this._parent.createEmptyMovieClip("clip"+baseDepth, baseDepth);
this._parent["clip"+baseDepth]._x = 350;
this._parent["clip"+baseDepth]._y = 254;
//load external file
this._parent["clip"+baseDepth].loadMovie(this.mymovie);
//test
_parent.loader.gotoAndPlay(2);
//opens thumbnail
if (this._currentframe != 10) {
this.gotoAndStop("open");
}
//removes old clips
this._parent["clip"+(baseDepth-1)].removeMovieClip();
};
}
function closeAllWinders(toKeepOpen) {
for (i=1; i<12; i++) {
if (toKeepOpen != i && this[“tn”+i].opened == true) {
this.top_loader[“tn”+i].opened = false;
this.top_loader[“tn”+i].gotoAndPlay(“off”);
}
}
}
stop();
////////////////////////////////////////////////////////////
also, here is the code for the preloader:
////////////////////////////////////////////////////////////
bl = _root.top_loader.getBytesLoaded();
bt = _root.top_loader.getBytesTotal();
if (bt == bl && bt>12 && bl>12) {
_root.top_loader.gotoAndPlay(2);
gotoAndStop(1);
} else {
gotoAndPlay(3);
}
////////////////////////////////////////////////////////////
And finally here is a link to the actual gallery:
http://www.special8.com/betty2/
Any and all help is greatly appreciated!!!
Spesh