是否可以使用Actionscript 3.0在一个文本字段中使用两种文本颜色?
例如:我怎么能像第一个字符串黑色和第二个字符串红色?
使用单一颜色时,这是我的代码:
public function logs(txt)
{
if (txt == '')
{
textLog.text = "Let's Open up our treasure boxes !!!";
}
else
{
textLog.text = '' + txt + '';
}
textLog.x = 38.60;
textLog.y = 60.45;
textLog.width = 354.50;
textLog.height = 31.35;
textLog.selectable = false;
textLog.border = false;
var format:TextFormat = new TextFormat();
var myFont:Font = new Font1();
format.color = 0x000000;
format.font = myFont.fontName;
format.size = 18;
format.align = TextFormatAlign.CENTER;
format.bold = false;
textLog.embedFonts = true;
textLog.setTextFormat(format); …Run Code Online (Sandbox Code Playgroud) 我试图将元素放在水平行中,以便我可以滚动它们,为此我制作了一个内部容器和一个外部容器。外部容器具有固定宽度,内部容器的宽度应由其内容决定,该宽度可以大于外部 div。
超文本标记语言
<div id="outer">
<div id="inner">
<ul>
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
</ul>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#outer{
width:250px;
position: relative; /* required to make overflow hidden work */
overflow:hidden; /* commented to demonstrate the issue */
background-color: lightgreen;
height: 80px;
}
#inner {
position: absolute;
width: 1000px; /* <- needs to scale to content */
}
ul {
margin: 0;
padding: 0;
}
.item:first-child{
margin-left:0;
}
.item {
width: 100px;
height: 80px;
background-color: lightblue; …Run Code Online (Sandbox Code Playgroud) 我想知道如何从URL变量加载外部图像以及如何调用HTML URL变量.
示例: embed src="http://domain.com/swf/load.swf?imageUrl=http://domain.com/images/image123.jpg" .... />}
我试图用这种方式制作一个图像播放器.谢谢