# loadMovie problems on Macs

**URL:** <https://forum.kirupa.com/t/loadmovie-problems-on-macs/153483>\
**Category:** flash\
**Created:** [July 1, 2005, 6:37pm UTC](https://forum.kirupa.com/t/loadmovie-problems-on-macs/153483 "2005-07-01T18:37:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pspecial](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pspecial](https://forum.kirupa.com/u/pspecial)\
**Post date:** [July 1, 2005, 6:37pm UTC](https://forum.kirupa.com/t/loadmovie-problems-on-macs/153483/1 "2005-07-01T18:37:59Z")

</div>

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/](http://www.special8.com/betty2/)

Any and all help is greatly appreciated!!!

Spesh
