Flex mobile project does not support mx:Canvas?

时光总嘲笑我的痴心妄想 提交于 2019-12-23 02:43:08

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/13022577/flex-mobile-project-does-not-support-mxcanvas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!