Flex mobile project does not support mx:Canvas?

1.8k views Asked by At

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

There are 1 answers

4
JeffryHouser On BEST ANSWER

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.