here’s my xml code … >
Why won’t my images activate the ‘trace’ function when I click them? The pictures load correctly, so everything else is ok …
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.load("links.xml");
xmlData.onLoad = LoadXML;
function LoadXML(ok)
{
if(ok)
{
myFunction(this);
}
else
{
trace("Error with code");
}
}
function myFunction(xmlData)
{
xmlNode = xmlData.firstChild.childNodes;
var cardTotal:Number = xmlNode.length;
link = *;
for (i=0;i<cardTotal;i++)
{
link* = xmlNode*.attributes.picture;
_root.createEmptyMovieClip("link"+i+"_mc",i);
_root["link"+i+"_mc"].loadMovie(link*);
_root["link"+i+"_mc"].onRelease = function()
{
trace(link*);
}
}
}
thanks!!!