Actionscript 3.0 中支持 fscommand2 吗?

发布于 2024-09-05 09:10:26 字数 458 浏览 4 评论 0原文

我对动作脚本非常陌生。 我正在使用 Flash Professional CS5 和 ActionScript 3.0。 问题是,当我尝试使用 fscommand2 函数时,Flash 编译器抛出错误:

Scene 1, Layer 'Layer 1', Frame 1, Line 7   1180: Call to a possibly undefined method fscommand2.

但是,我能够使用 fscommand。但是,它的用途不同,因此无法满足我获取设备(移动)属性(如 DeviceID 等)的要求。

请帮助我使用 fscommand2 或任何等效的 API 支持在 ActionScript 3.0 中。 提前致谢。

I am very new to Action Script.
I am using Flash Professional CS5 with ActionScript 3.0.
The problem is, When I am trying to use fscommand2 function, Flash Compiler throwing an error saying:

Scene 1, Layer 'Layer 1', Frame 1, Line 7   1180: Call to a possibly undefined method fscommand2.

But, I am able to use fscommand. But, it is for different purpose, so will not fulfill my requirement to get Device(Mobile) properties like DeviceID etc.

Please help me in using fscommand2 or any equivalent API support in ActionScript 3.0.
Thanks in advance.

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

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

发布评论

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

评论(1

听不够的曲调 2024-09-12 09:10:26

这取决于您要使用哪个 fscommand2。 fscommand2 是一个 Flash Lite API,因此您唯一将其与 AS3 一起使用的情况是您的目标是 Flash Lite 4(支持 AS3 并且与 fscommand2 向后兼容)。

对于一般 AS3 开发,一些 fscommand2 功能被普通 AS3 API 取代。例如:

// status = fscommand2("FullScreen", true);
// replaced by:
stage.displayState = StageDisplayState.FULL_SCREEN;

// status = fscommand2("GetTotalPlayerMemory");
// replaced by:
trace( System.totalMemory );

但是 fscommand2 的一些其他功能,如处理软键、信号电平等,没有 AS3 等效功能。这些主要是您无论如何都无法在浏览器中使用的命令,因此我认为您实际上不会失去浏览器内容的任何功能。

不管怎样,简短的版本是,您只需要找到一个等效的 AS3 命令来完成您想要做的事情 - 所以请让我们知道这一点,或者提出一个后续问题。 ;)

It depends on which fscommand2 you want to use. fscommand2 is a Flash Lite API, so the only time you'd use it with AS3 would be if you're targeting Flash Lite 4 (which supports AS3 and is back-compatible with fscommand2).

For general AS3 development, some fscommand2 functionalities are replaced by normal AS3 APIs. For example:

// status = fscommand2("FullScreen", true);
// replaced by:
stage.displayState = StageDisplayState.FULL_SCREEN;

// status = fscommand2("GetTotalPlayerMemory");
// replaced by:
trace( System.totalMemory );

But some other fscommand2 functions, like dealing with soft keys, signal level, etc. have no AS3 equivalent. Those are mainly the commands that you couldn't use in a browser anyway though, so I don't think you actually lose any functionality for browser contents.

Anyway, the short version is that you just have to find an equivalent AS3 command for what you'd like to do - so please let us know that, or open a followup question. ;)

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