【问题标题】:Is it possible to use the Flash Player 11 APIs with OpenLaszlo?是否可以将 Flash Player 11 API 与 OpenLaszlo 一起使用?
【发布时间】:2012-08-14 09:19:27
【问题描述】:

我正计划构建一个小型应用程序,它使用 Flash Player 11 的某些功能。是否可以使用 OpenLaszlo 来定位 Flash Player 11 API?在this discussion 中显示了如何将 ActionScript 包导入 OpenLaszlo 应用程序,但基于the compiler description of version 4.9 似乎只有一个 swf10 运行时,针对 Flash Player 10 APIS。

【问题讨论】:

    标签: actionscript-3 flash openlaszlo


    【解决方案1】:

    OpenLaszlo 的一个分支是几周前创建的,支持 SWF11 运行时。查看OpenLaszlo Community space at Assembla.com中对应的线程

    目前,该版本的 OpenLaszlo 仅作为夜间版本提供,可从 here 下载。似乎计划发布支持 SWF11 运行时的 OpenLaszlo 5.0 版本。

    【讨论】:

      【解决方案2】:

      我为 OpenLaszlo 实现了 SWF11 运行时功能,但不知道什么时候会有新的运行时支持的正式版本。 flex4.6 分支对于 SWFx 开发应该非常稳定,您可以在生产中使用它。

      这是一个代码示例,展示了如何使用 Flash Player 11.0 中添加的新 JSON class in ActionScript

      <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 调试器中看到以下输出:

      INFO: {"firstname":"Jimmy","lastname":"Hendrix","birthday":"November 1942 年 1 月 27 日"}

      如果您尝试使用 swf10 运行时编译应用程序,您将看到以下编译器错误:

      编译错误

      org.openlaszlo.sc.CompilerError: json.lzx: 9: Error: Access of 未定义属性 JSON,行内:jsonStr = JSON.stringify(person);

      【讨论】:

        猜你喜欢
        • 2011-03-21
        • 1970-01-01
        • 2011-02-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多