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

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

问题描述

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

 <?xml version ?= 1.0 > 
<! - 简单示例来演示Halo Canvas布局容器。 - >
xmlns:s =library://ns.adobe.com/flex/spark
xmlns:mx =library://ns.adobe.com/flex/mx>
< mx:Canvas />
< / s:Application>

Canvas行无法编译。但是,在Flex项目中也可以。我的问题是,是否有任何方法可以使用Canvas或其他晕控制而不修改Flex移动项目中的遗留代码?或者,有什么办法在Flex项目中使用本机扩展?如果两者都是NO,这将是一场噩梦。

解决方案


我的问题是,有没有如何使用Canvas或其他光环控制
而不修改Flex移动项目中的遗留代码?

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

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

我不确定我会推荐它。因为MX组件未针对移动应用进行优化。我不清楚帆布会给你什么,你不能从一个组。


是否有任何方法可以在Flex项目中使用本地扩展?

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

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>

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.

解决方案

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

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

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.

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

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天全站免登陆