查找沿路径AS3的所有点 [英] Find all points along a path AS3

查看:272
本文介绍了查找沿路径AS3的所有点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想要一个影片剪辑随机添加到沿Bezier曲线的任何一点。有没有办法找到一条路径的所有点?或者,也许有办法找到方程(这是一个二次曲线)?如果一切都失败了,有没有办法找到沿着一条直线的点(即不是完全水平或垂直)?

Basically, I want to randomly add a movie clip to any point along a bezier curve. Is there a way to find all points along a path? Or maybe there's a way to find the equation (it's a quadratic curve)? If all else fails, is there a way to find the points along a straight line (that isn't perfectly horizontal or vertical)?

推荐答案

如果您正在使用钢笔工具,这是创建一个图形。您可以通过从 Shape.graphics.readGraphicsData读取结果访问这种形状的路径()

If you are using the pen tool, this is creating a Shape. You can access the path of this shape by reading the result from Shape.graphics.readGraphicsData()

请参阅参考<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#readGraphicsData%28%29"相对=nofollow> readGraphicsData

这篇关于查找沿路径AS3的所有点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆