本文介绍了操纵使用AS3绘制矢量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要做的是使用钢笔工具绘制一个形状,然后使用AS3扭曲锚点操纵这种形状。我怎样才能从内部AS3访问锚点等?我可以绘制的形状转换为影片剪辑元件,并从动作脚本访问这一点,但我怎么那么操纵载体?

What I want to do is draw a shape using the pen tool and then manipulate this shape using AS3 to distort the anchor points. How can I access the anchor points etc from within AS3? I can convert the drawn shape to a movie clip symbol, and access this from the Action Script, but how do I then manipulate the vector?

感谢

推荐答案

不幸的是,你不能做这样的。一旦你导出的SWF在IDE中绘制的形状将无法编辑。

Unfortunately, you can't do it like that. A shape drawn in the IDE will not be editable once you export the swf.

如果你想创建一个动画元素,你可以使用ActionScript绘制,使用的,但您需要以编程方式创建你的形状,而且每次重绘图像锚的变化。

If you want to create an animated element, you can draw with ActionScript, using the Graphics API, but you need to create your shape programmatically, and redraw the image every time an anchor changes.

如果你真的希望用户能够实时绘制,没有快速简便的方法来做到这一点,无论是:你需要创建自己的钢笔工具和主持人,画出它们之间的线条,使他们可拖动,实施撤销,等等。

If you actually want users to be able to draw in real time, there is no quick and easy way to do this, either: You need to create your own pen tool and anchors, draw lines between them, make them draggable, implement undo, etc.

下面是一些第一步如何做这样的事情,在 AS2 和的。

Here are some "first steps" tutorials on how to do something like that in AS2 and AS3.

这篇关于操纵使用AS3绘制矢量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 13:46
查看更多