I'm currently working on an Adobe Flex Air Project, which was created with Flex 3.6! But now it should become an App for IPad, but Flash Builder can only export projects as App since Flex 4.6. So I'm trying to convert the project from Flex 3.6 to 4.6, what should be easy to do, I guess, but there are some problems with libraries and/or namespaces, which confuse me. This is how my Main-mxml starts:
<s:Application xmlns:mx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:MyComp="*"
xmlns:local="*"
xmlns:srv="generated.webservices.*"
width="1366"
applicationComplete="init()"
backgroundGradientColors="[0xffffff,0xffffff]"
borderColor="#ffffff"
color="#eaeaea"
fontSize="14"
horizontalScrollPolicy="off"
layout="absolute"
paddingBottom="0"
paddingLeft="0"
paddingRight="0"
paddingTop="0"
verticalScrollPolicy="off">
But I get the error:
`Attribute "mx" bound to namespace "http://www.w3.org/2000/xmlns/" was already specified for element "s:Application".`
But if I remove the line
`xmlns:mx="library://ns.adobe.com/flex/mx"`
then of course I can't use e.g. mx:VBox any more and would have to refactor the whole project.
I tried some test examples using Flex 4.6, e.g.
<?xml version="1.0"?>
<!-- containers\layouts\BoxSimple.mxml -->
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark">
<mx:Box direction="vertical"
borderStyle="solid"
paddingTop="10"
paddingBottom="10"
paddingLeft="10"
paddingRight="10">
<mx:Button id="fname" label="Button 1"/>
<mx:Button id="lname" label="Button 2"/>
<mx:Button id="addr1" label="Button 3"/>
<mx:ComboBox id="state">
<mx:ArrayList>
<fx:String>ComboBox 1</fx:String>
</mx:ArrayList>
</mx:ComboBox>
</mx:Box>
</s:Application>
But here I get the error
`"Could not resolve <mx:Button> to a component implementation." `and more like this.
Now my question(s): 1. It's possible to use all three namespaces
`(xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark")`
Right? I saw this on several examples on the internet so I think it must work.
- Do I have to reference/add external libraries to use Flex 4.6 with these 3 namespaces?
- Is there an easy general way for migrating from Flex 3.6 to 4.6? Is it at all necessary to make changes or must it work in 4.6, even though developed in 3.6?
Besides, I'm relatively new to Flex, though it's not difficult I think.
Thanks in advance
Regards,
Max B