hi, I tried to implement animated text into my project but it did not work. I want to get the text from my icons.xml file. Here is what I am working out. Can anyone have a look and tell me what is wrong with it?
CODE
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
var sInt = setInterval(writeIt,15);
var count:Number = 0;
function writeIt() {
theText.text = t.content.substring(0,count);
count++;
if(count > t.content.length) {
clearInterval(sInt);
}
}
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}