Hi!
Really Nice Board! :)
I made a MovieClip which shows the data from a XML file.
The problem is that in the function 'xmlResponseLoaded' the 'this-
reference' points to the XML data and not to the movie-clip. I.e., the
call 'xmlSuccess()' is not '_level0.myClip.xmlSuccess', but
'_level0.xmlSuccess'.
Since 'myClip' is attached dynamically, I don't know the name of
'myClip' after it is attached (so '_level0.myClip.xmlSuccess();' will
not work)
I absolutely need the 'this-reference' in the movie-clip.
Does anyone have an idea??
Thanks much for your help!
Greetings from Germany
ralf
source:
//-----------------------------------
// Get XML-Data:
xmlResponse = new XML();
xmlResponse.onLoad = xmlResponseLoaded;
xmlResponse.load("myXML.xml");
// Wait for XML-Data:
function xmlResponseLoaded(success)
{
if (success)
{
trace("this = " add this);
xmlSuccess();
}
else {RequestStatus = "Request failed.";}
}
// XML-Load success:
function xmlSuccess()
{
//makeChart:
//...
}