AS 2.0 - Passing xml file path as a flashvars in onClipEvent

Posted by Anaya on Stack Overflow See other posts from Stack Overflow or by Anaya
Published on 2010-06-07T09:51:43Z Indexed on 2010/06/07 9:52 UTC
Read the original article Hit count: 164

Filed under:
|

Hi,

I want to pass xml file path dynamically using flashvars. It works ok in Onrollover and Onrollout events. But not in onClipEvent. Below is the code I am using -

onClipEvent (load) 
{
cnetXML = new XML();
cnetXML.ignoreWhite = true;
cnetXML.onLoad=extractData;
var xmlfile = xmlpath;
cnetXML.load(xmlfile);
function extractData(success)
{
rootHandler=this.firstChild.childNodes[23].childNodes[5].firstChild.nodeValue;
if (rootHandler)
gotoAndStop(2);
}
}

If I replace xmlpath in above script with actual link, it works ok. Please let me know what I am missing here?

Thanks in advance for your time!

Kind Regards

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about 2.0