使用 ActionScript 更改图形实例

发布于 2024-09-01 15:39:16 字数 132 浏览 3 评论 0原文

我想知道是否有可能使用动作脚本动态更改框架中使用的“图形”。

我希望更改图形是其实例的图像或更改我在当前帧中使用的图形。

干杯

补充: 我可以为每个图形设置一个图层,然后使用操作脚本选择显示哪个图层吗?

I was wondering if it is at all possible to change the "Graphic" used in a frame dynamically using actionscript.

I was hoping to either change the image the Graphic is an instance of or change the Graphic I am using in the current frame.

Cheers

Addition:
Could I have a layer for each Graphic and then using action script choose which layer shows?

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

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

发布评论

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

评论(1

在 AS 3 中,“图形”对象是只读的,因此您无法更改它。但是您可以使用graphics.clear();然后绘制另一个图像。

In AS 3 the "Graphics" object is read-only so you cannot change it. But you can use graphics.clear(); and then draw another image.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文