Flex:如何加载 .swf 并使用其库?

发布于 2024-07-24 02:34:00 字数 135 浏览 6 评论 0原文

我在 .swf 的库中有一个符号,其链接名称为“Pana”。 Pana 符号只是一个 100 帧动画,我想在 Flex 中对其进行时间轴控制。 那么如何加载 .swf,然后将 Pana 符号添加到显示列表并控制其时间线?

谢谢!

I have a symbol in a .swf's library, with a linkage name of "Pana". The Pana symbol is just a 100 frame animation that I would like to have timeline control over in Flex. So how can I load the .swf and then add the Pana symbol to the display list and control it's timeline?

Thanks!

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

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

发布评论

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

评论(2

我一向站在原地 2024-07-31 02:34:00

您将使用 ApplicationDomain 类中的 getDefinition 函数。 可以在这里找到一个相当简单的示例:

http://help。 adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e07.html

You would use the getDefinition function from the ApplicationDomain Class. A fairly simple example can be found here:

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e07.html

七秒鱼° 2024-07-31 02:34:00

您可以将该符号嵌入到 MXML 中:

[Embed(source="yourlib.swf#SymbolName")]
private var swfSymbol:Class;

然后将其用作:

// Cast it as MovieClip
var symb:MovieClip = new swfSymbol() as MovieClip;
addChild(symb);
// And control the timeline
symb.gotoAndPlay('someFrameLabel');

You can embed that symbol in your MXML:

[Embed(source="yourlib.swf#SymbolName")]
private var swfSymbol:Class;

And then use it as:

// Cast it as MovieClip
var symb:MovieClip = new swfSymbol() as MovieClip;
addChild(symb);
// And control the timeline
symb.gotoAndPlay('someFrameLabel');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文