# Help with loading swf into a holder\_mc

**URL:** https://forum.kirupa.com/t/help-with-loading-swf-into-a-holder-mc/329282
**Category:** flash
**Created:** [August 8, 2012, 11:32pm UTC](https://forum.kirupa.com/t/help-with-loading-swf-into-a-holder-mc/329282 "2012-08-08T23:32:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![KyriakosCY](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@KyriakosCY](https://forum.kirupa.com/u/KyriakosCY)
#### Post date: [August 8, 2012, 11:32pm UTC](https://forum.kirupa.com/t/help-with-loading-swf-into-a-holder-mc/329282/1 "2012-08-08T23:32:49Z")

</div>

Hi guys,

I am building a website ( **AS2** ) that has a portfolio section made up of a series of .swf’s embeded in each other.

Here is the basic architecture:

Main site with a holder\_main movieclip that has the following code to load the next section:

```auto
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object ();
mcLoader.addListener(myListener);
mcLoader.loadClip("Flash/PortfolioMain.swf","holder_main");

```

The next section is a portfolio section made up of a holder\_mc movieclip and another movieclip with scrollable thumbnails (buttons) that will be used to call the swf’s to load in the holder\_mc. The thumbs are inside a content mc which in turn is inside the scroller MC with the masks, scrollbar etc…

Here is the code for the buttons to load into the holder\_mc:

```auto
on (Release) {
_root.holder_mc.loadMovie("Portfolio/Test2.swf");
}

```

This code works perfectly when I test it inside flash, but when I test it on any browser (swf nested in html document,\*\* not preview in browser\*\*) it does not work and it is driving me crazy.

If I take the button outside of the content & scroller movieclip’s and throw it on the main timeline it seems to work perfectly both in flash and the browser when I change the AS to:

```auto
on (Release) {
loadMovie("Flash/Portfolio/Test2.swf", "holder_mc");
}

```

I assumed that using \_root would do the same thing from inside the scroller movieclip…

I would really appreciate it if anybody could point out any reasons why this is happening…

Thanks in advance!
