School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,363 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,441 people online right now. Registration is fast and FREE... Join Now!




animated text in AS2

 

animated text in AS2

peihwa330

21 Jun, 2009 - 07:58 PM
Post #1

D.I.C Head
**

Joined: 15 Mar, 2007
Posts: 62



Thanked: 1 times
My Contributions
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;
    }
}


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 08:37PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month