Flex 移动项目不支持 mx:Canvas? [英] Flex mobile project does not support mx:Canvas?

查看:37
本文介绍了Flex 移动项目不支持 mx:Canvas?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Flash Builder 中,如果我新建一个 Flex Mobile 项目,并粘贴以下代码:

In Flash Builder, if I new a Flex Mobile Project, and paste the following code:

<?xml version="1.0"?>
<!-- Simple example to demonstrate the Halo Canvas layout container. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:Group/>
    <mx:Canvas/>
</s:Application>

Canvas"行无法编译.但是在 Flex 项目中是可以的.我的问题是,有没有办法在不修改 Flex Mobile Project 中的遗留代码的情况下使用 Canvas 或其他光环控件?或者,有没有什么办法可以在Flex Project中使用Native Extension?如果两者都不是,那将是一场噩梦.

The "Canvas" line fails to compile. However it's OK in a Flex Project. My question is, is there any way to use Canvas or other halo controls without modifying the legacy code in Flex Mobile Project? Or, is there any way to use Native Extension in Flex Project? If both are NO, it would be a nightmare.

推荐答案

我的问题是,有没有办法使用 Canvas 或其他光环控件不修改 Flex Mobile Project 中的遗留代码?

My question is, is there any way to use Canvas or other halo controls without modifying the legacy code in Flex Mobile Project?

是的,您必须将 mx.swc 添加到移动项目的库路径中.它应该位于类似这样的地方:

Yes, you have to add the mx.swc to the library path of your mobile project. It should be located in a place similar to this:

[FrameworkRoot]\frameworks\libs\mx\mx.swc

我不确定我会推荐它;因为 MX 组件未针对移动使用进行优化.我不清楚 Canvas 会为您提供哪些您无法从 Group 获得的东西.

I'm not sure I'd recommend it; as the MX components are not optimized for mobile usage. I'm unclear what a Canvas would offer you that you couldn't get from a Group.

有没有办法在 Flex Project 中使用 Native Extension?

is there any way to use Native Extension in Flex Project?

没有;本机扩展是一项 AIR 功能;您将无法在基于浏览器的项目中使用它们.

No; Native Extensions are an AIR feature; you will not be able to use them in a browser based project.

这篇关于Flex 移动项目不支持 mx:Canvas?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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