# Loader class working in Flash, but not in browser

**URL:** https://forum.kirupa.com/t/loader-class-working-in-flash-but-not-in-browser/296860
**Category:** Uncategorized
**Created:** [September 21, 2009, 10:43pm UTC](https://forum.kirupa.com/t/loader-class-working-in-flash-but-not-in-browser/296860 "2009-09-21T22:43:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![peterbilt\_47](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@peterbilt\_47](https://forum.kirupa.com/u/peterbilt_47)
#### Post date: [September 21, 2009, 10:43pm UTC](https://forum.kirupa.com/t/loader-class-working-in-flash-but-not-in-browser/296860/1 "2009-09-21T22:43:52Z")

</div>

Hi, all- I’m running into a problem loading an external swf. Check it out here: [http://www.brownshoemedia.com/staging](http://www.brownshoemedia.com/staging)

If it’s working right, the top and bottom red areas should end up looking exactly the same.

I have “init.swf” loading “cc\_home.swf” into a container. When successful, it should fade up (that animation is in “init.swf”) and then load the white text (cc\_home.swf). What you’re seeing on that page is init.swf on top, and cc\_home.swf down below.

When I test init.swf directly from Flash, it works fine. In the browser, though, it doesn’t load the movie.

Here’s the code I’m using in “init.swf” to load cc\_home.swf (which I got from Kirupa):

* * *

var mycontainer:MovieClip;  
var myloader:Loader = new Loader();  
var urlrequest:URLRequest = new URLRequest(“cc\_home.swf”)  
myloader.load(urlrequest);

myloader.contentLoaderInfo.addEventListener(Event.INIT, loaded);

function loaded(e):void{  
mycontainer = e.target.content;  
addChild(mycontainer);  
mycontainer.play();  
//do your stuff…  
}

* * *

Any idea why it would work in Flash but not in the browser? (yes, I checked- it’s the most recent Flash Player)
