# External SWF Preloader Problems

**URL:** <https://forum.kirupa.com/t/external-swf-preloader-problems/220093>\
**Category:** flash\
**Created:** [March 22, 2007, 5:05pm UTC](https://forum.kirupa.com/t/external-swf-preloader-problems/220093 "2007-03-22T17:05:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spastic](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@spastic](https://forum.kirupa.com/u/spastic)\
**Post date:** [March 22, 2007, 5:05pm UTC](https://forum.kirupa.com/t/external-swf-preloader-problems/220093/1 "2007-03-22T17:05:58Z")

</div>

I know this is a common question, but I checked the Kirupa tutorial and it really hasn’t helped me. I want to use a specific preloader (found: [http://www.kirupa.com/forum/showthread.php?t=83404&highlight=circular+preloader](http://www.kirupa.com/forum/showthread.php?t=83404&highlight=circular+preloader)), but make it load an external swf, and I can’t seem to get the scripting working. Here is the script:

```auto

_root.createEmptyMovieClip("loader", _root.getNextHighestDepth());
loader._x = 975/2;
loader._y = 600/2;
r1 = 55;
r2 = 35;
for (var i = 0; i<100; i++) {
	begAng = i*3.6;
	endAng = begAng+2.6;
	var bar = loader.createEmptyMovieClip("bar"+i, loader.getNextHighestDepth());
	bar.lineStyle(0, 0xC4DBE8, 20);
	bar.beginFill(0xFFFFFF, 25);
	bar.moveTo(Math.cos(begAng*(Math.PI/180))*r1, Math.sin(begAng*(Math.PI/180))*-r1);
	bar.lineTo(Math.cos(endAng*(Math.PI/180))*r1, Math.sin(endAng*(Math.PI/180))*-r1);
	bar.lineTo(Math.cos(endAng*(Math.PI/180))*r2, Math.sin(endAng*(Math.PI/180))*-r2);
	bar.lineTo(Math.cos(begAng*(Math.PI/180))*r2, Math.sin(begAng*(Math.PI/180))*-r2);
	bar.lineTo(Math.cos(begAng*(Math.PI/180))*r1, Math.sin(begAng*(Math.PI/180))*-r1);
	bar.endFill();
	bar._alpha = 50;
}
loaded = 0;
_root.onEnterFrame = function() {
    loaded = (_root.getBytesLoaded()/_root.getBytesTotal())*100;
}
loader.onEnterFrame = function() {
    var loade = Math.floor(loaded);
    for (var i = 0; i<=loade; i++) {
        this["bar"+i]._alpha = 100;
    }
    if(loade == 100) {
        gotoAndStop("Scene 2", 1);
		removeMovieClip("loader");
    }
};

stop();

```

Instead of using “\_root.getBytesLoaded”, how do I make it refer to an external swf? Also, instead of “gotoAndStop” would use a load movie command?

Thanks
