如何使用actionscript 3(使用flex 4)绘制流畅的线条?如何在actionscript 3(Flash)中绘制流畅的线条
我的意思是:我做这样的事情:
var grap:Graphics = this.display.graphics;
grap.lineStyle(8, 0xFF0000, 1, true, "normal", CapsStyle.ROUND);
grap.moveTo(180,330);
grap.lineTo(200,130);
但结果是这样的:
http://sub.ited.nl/try/ :(
线条的边缘非常脆,我怎么能改善这个 ?特别是通过吐温画线时,它看起来像一个喝醉酒的人走在人行道上;)...
补间代码绘制线:
var grap:Graphics = this.display.graphics;
grap.lineStyle(8, 0xFF0000, 1, true, "normal", CapsStyle.ROUND);
grap.moveTo(220,330);
new Tween(this, [220, 330], [240, 130]);
而在onTweenUpdate方法:
this.display.graphics.lineTo(values[0], values[1]);
请对此一些建议吗?
顺便说一句:如何才能最好地移除flash对象的默认背景? (灰色背景)。 我有这个在我的index.mxml:
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="600"
addedToStage="start()" styleName="plain" backgroundImage="{null}">
但我看到一个闪烁的频率(以开发模式),这意味着我第一次看到默认的灰色背景,然后一块白一块...
在此先感谢
顺便提一句,您可能想要提出一个有关背景的新问题,标记为“Flex” - 因为该灰色背景是由Flex框架绘制的,而不是Flash本身。 Flash本身的“真实”背景取决于你如何嵌入SWF(即,如果你正在编写HTML,它是你的'object'和'embed'标签的一个参数)。 – fenomas 2010-06-21 10:09:01