是否可以使用Flash Player 11的API的用OpenLaszlo? [英] Is it possible to use the Flash Player 11 APIs with OpenLaszlo?

查看:140
本文介绍了是否可以使用Flash Player 11的API的用OpenLaszlo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算建一个小的应用程序,它使用的Flash Player 11中的某些功能是否可以针对Flash Player 11中的API与OpenLaszlo的?在<一个href="http://stackoverflow.com/questions/11881562/how-can-i-add-actionscript-3-import-statements-to-lzx-class-definitions-with-ope">this 该讨论真实显示ActionScript包中如何导入到OpenLaszlo应用程序,但基于的 4.9版本的编译器描述似乎只有一个SWF10运行时,针对Flash Player的10 APIS。

I'm planning to build a small application, which uses some features of Flash Player 11. Is it possible to target the Flash Player 11 APIs with the OpenLaszlo? In this discussion it's shown how ActionScript packages can be imported into OpenLaszlo applications, but based on the compiler description of version 4.9 it seems that there is only an swf10 runtime, targeting Flash Player 10 APIS.

推荐答案

我实现的的OpenLaszlo的SWF11运行时功能,但不知道什么时候会有一个正式发布的新的运行时支持。该flex4.6分支应该是SWFX发展非常稳定,可以在生产中使用它。

I implemented the SWF11 runtime feature for OpenLaszlo, but don't know when there will be an official release with the new runtime support. The flex4.6 branch should be very stable for SWFx development, you can use it in production.

下面是展示如何使用新的 JSON类在ActionScript ,其中添加的Flash Player 11.0:

Here is a code example showing how you can use the new JSON class in ActionScript, which was added with Flash Player 11.0:

<canvas debug="true">

  <script>
    var person = {
      lastname: "Hendrix",
      firstname: "Jimmy",
      birthday: "November 27, 1942"
    };
    var jsonStr = JSON.stringify(person)
    Debug.info(jsonStr);
  </script>

</canvas>

如果您在使用swf11运行时编译应用程序,你应该看到的OpenLaszlo调试器下面的输出中:

If you compile the application using the swf11 runtime, you should see the following ouput in the OpenLaszlo debugger:

信息:{名字:吉米,姓氏:亨德里克斯,生日:11月   27,1942年}

INFO: {"firstname":"Jimmy","lastname":"Hendrix","birthday":"November 27, 1942"}

如果您尝试使用SWF10运行时编译应用程序,你会看到下面的编译器错误:

If you try to compile the application using the swf10 runtime, you will see the following compiler error:

编译错误

org.openlaszlo.sc.CompilerError:json.lzx:9:错误:的访问   未定义的属性JSON,在行:jsonStr = JSON.stringify(人);

org.openlaszlo.sc.CompilerError: json.lzx: 9: Error: Access of undefined property JSON, in line: jsonStr = JSON.stringify(person);

这篇关于是否可以使用Flash Player 11的API的用OpenLaszlo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆