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</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 < 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