Pau*_*aul 1 flash actionscript actionscript-3 flash-cs4
大家好,
我想知道如何在flash中为锚标签设置样式(例如:需要颜色为蓝色,我想使其变为粗体).
我为rss feed创建了一个flash小部件,我不知道如何在它中添加样式,就像我们在Dreamweaver中使用的css一样.
让我们来看看下面的脚本,它是AS3 ..
我想要的是......
1,我需要做一个标签应该看起来大胆和paleblue颜色.
2,描述结束后需要添加灰色边框.
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item;
for(var i:uint=0; i<il.length(); i++)
{
ta.htmlText="<a href='"+il.link.text()[0]+"'>"+il.title.text()[0]+"</a>"+"\<br />"+il.description.text()[0]+"\<br />"+"\<br /><hr />"+"<a href='"+il.link.text()[1]+"'>"+il.title.text()[1]+"</a>"+"\<br />"+il.description.text()[1]+"\<br />"+"\<br /><hr />"+"<a href='"+il.link.text()[2]+"'>"+il.title.text()[2]+"</a>"+"\<br />"+il.description.text()[2];
addChild(ta);
}
}
Run Code Online (Sandbox Code Playgroud)
寻找你的回复..
提前致谢!
保罗
小智 5
you can use style sheet in flash textField, but not all properties are supported. only below are supported: color display fontFamily fontSize fontStyle fontWeight kerning leading letterSpacing marginLeft marginRight textAlign textDecoration textIndent see: http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000292.html