Flash caroussel xml parse html link

Posted by Marvin on Stack Overflow See other posts from Stack Overflow or by Marvin
Published on 2010-05-05T13:14:45Z Indexed on 2010/05/05 13:18 UTC
Read the original article Hit count: 260

Filed under:
|
|
|
|

Hello I am trying to modify a carousel script I have in flash. Its normal function is making some icons rotate and when clicked they zoom in, fade all others and display a little text. On that text I would like to have a link like a "read more".

If I use CDATA it wont display a thing, if I use alt char like

 <a href="www.google.com">  Read more + </a>

It just displays the text as: <a href="www.google.com"> Read more + </a>. The flash dynamic text box wont render it as html.

I dont enough as2 to figure out how to add this. My code:

var xml:XML = new XML();
xml.ignoreWhite = true; //definições do xml

 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;
    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;
}
}

And the xml:

<?xml version="1.0" encoding="UTF-8"?>
<icons>

<icon image="images/product.swf" tooltip="Product" content="Hello this is some random text
  &#60;a href=&#34;www.google.com&#34;&#62;  Read More + &#60;/a&#62; "/>

</icons>

Any suggestions?

Thanks.

© Stack Overflow or respective owner

Related posts about as2

Related posts about html