导出 Flash 中对象的 XY 坐标

发布于 2024-12-20 01:53:56 字数 68 浏览 1 评论 0原文

我有一个 Flash 项目,我想从中导出对象的坐标。

理想情况下,我想要动画中每一帧的对象位置。这可能吗?

I have a Flash project that I would like to export the coordinates of an object from.

Ideally, I would like the position of the object for each frame in the animation. Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秋叶绚丽 2024-12-27 01:53:56

如果您有 Flash 源文件,最简单的解决方案是将以下代码添加到应用程序的第一帧中。

(假设 objectToTrack 是您想要从中获取坐标的影片剪辑的名称)

this.addEventListener( Event.ENTER_FRAME, onEnterFrame );

function onEnterFrame ( e:Event ):void {
    trace ( "x : " + objectToTrack.x + ", y : " + objectToTrack.y );
}

If you have the flash source files, the simplest solution would be to add the following code to the first frame of your application.

(Assuming objectToTrack is the name of the movieclip you want the coordinates from)

this.addEventListener( Event.ENTER_FRAME, onEnterFrame );

function onEnterFrame ( e:Event ):void {
    trace ( "x : " + objectToTrack.x + ", y : " + objectToTrack.y );
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文