操纵使用AS3绘制矢量

编程入门 行业动态 更新时间:2024-10-19 15:26:40
本文介绍了操纵使用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绘制,使用的图形API ,但您需要以编程方式创建你的形状,而且每次重绘图像锚的变化。

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 和的 AS3 。

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

更多推荐

操纵使用AS3绘制矢量

本文发布于:2023-11-23 16:01:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622054.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:矢量

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!