# Load external swf in the same movieclip rather than html link

**URL:** <https://forum.kirupa.com/t/load-external-swf-in-the-same-movieclip-rather-than-html-link/296759>\
**Category:** Uncategorized\
**Created:** [September 19, 2009, 7:12pm UTC](https://forum.kirupa.com/t/load-external-swf-in-the-same-movieclip-rather-than-html-link/296759 "2009-09-19T19:12:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dottzivago](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@dottzivago](https://forum.kirupa.com/u/dottzivago)\
**Post date:** [September 19, 2009, 7:12pm UTC](https://forum.kirupa.com/t/load-external-swf-in-the-same-movieclip-rather-than-html-link/296759/1 "2009-09-19T19:12:21Z")

</div>

Hi all!  
I bought a third-party image gallery xml driven where images activate html links. I need the image, when pressed, to import an external swf in the same movieclip where the gallery is and not external html links.

here the xml code:

here the xml code:  
\<content\>  
\<title\>\<![CDATA[\<b\>title\</b\>]]\>\</title\>  
\<image\>images/02.jpg\</image\>  
\<caption\>\<![CDATA[\<b\>" Example BOLD html text “\</b\> \<i\>” Example italic text"\</i\>, Lorem ipsum dolor sit amet numus. Wisi, ex enim luptatum facilisi os vel epulae iustum duis facilisi ulciscor facilisi, luptatum. Lorem ipsum dolor sit amet numus.]]\>\</caption\>  
\<link\>[http://www.mysite.net](http://www.mysite.net)\</link\>  
\</content\>

and here the relevant actionscript for the gallery:

**first frame**

xmlData = new XML();myXML  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“slidegallery.xml”);

function loadXML(successful)  
{  
if (successful)  
{  
Space = [];  
Title = [];  
Image = [];  
Caption = [];  
Link = [];  
xmlNode = this.firstChild;  
total = xmlNode.childNodes.length;

```
	for (i = 0; i &lt; total; i++)
    {
		Space* = xmlNode.attributes.space;
		Title* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
		Image* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
		Caption* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
		Link* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
	}
    gotoAndStop(2);
}else {
	trace("Error loading XML");
}

```

}  
stop();

**second frame:**

for (i = 0; i \< total; i++){

```
contentMC.attachMovie("attachMC", "images" + i, i);
path = contentMC["images" + i];
path._x = contentLength * i;
path.title_txt.htmlText = Title*;
path.caption_txt.htmlText = Caption*;
path.caption_txt.autoSize = true;
contentLength = Space*;
path.linkButton._link = Link*;
loadMovie(Image*, path.holderMC);

```

any image simple recall a html link, while I need to load in the same movieclip an external movieclip.

thanks in advance
