如何在Web应用程序中设置Flash参数?

发布于 2024-09-09 01:32:30 字数 49 浏览 1 评论 0原文

将预定义参数传递给 flash 的最佳方法是什么?

What's the best way to pass a predefined argument to flash?

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

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

发布评论

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

评论(1

苏佲洛 2024-09-16 01:32:30

将其作为 SWF URL 中的名称/值对传递。

"mymovie.swf?defColor=blue&stage=3"

并从 loaderInfo.parameters 中读取它root 影片剪辑的属性 - 具有文档类的属性。

var params:Object = root.loaderInfo.parameters;
//or this.loaderInfo.parameters if you're calling from the document class.
trace(params.defColor); // dot sytax and
trace(params["stage"]); // []  syntax works.

Pass it as name-value pairs in the SWF's URL.

"mymovie.swf?defColor=blue&stage=3"

and read it from the loaderInfo.parameters property of the root movie clip - the one with the document class.

var params:Object = root.loaderInfo.parameters;
//or this.loaderInfo.parameters if you're calling from the document class.
trace(params.defColor); // dot sytax and
trace(params["stage"]); // []  syntax works.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文