1 Reply Latest reply on Sep 5, 2011 4:08 AM by Anirudh Sasikumar

    converting legacy code to Flash Builder 4.5

    miquael Level 1

      Okay, I'm converting an older Flex AIR project into Flash Builder 4.5 mobile project.  I'm still a bit new to Flex overall, and still getting a handle on namespacing.  I'm getting a few "could not resolve [FILL_IN_THE_BLANK] to a component implementation" errors on just 3 lines, with:

       

      <s:HDividedBox>
      <s:Tile>
      <s:DateField>

       

      If I change the fx namespaceing to "http://ns.adobe.com/mxml/2006" it appears to resolve the issue, but then my <fx:Script> gets all messed up by the ActionScript becoming colorless, loses formatting, and then the entire file is just one big vague error.  If I change fx bacl to "2009", then the ActionScript is resolved, but the tag components (listed above) are not recognized.

      What's the solution?

       

      Here is my code (with a very large block of ActionScript excluded):

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                               xmlns:s="library://ns.adobe.com/flex/spark"

                               title="HomeView"

                               backgroundColor="white"

                               xmlns:local="*"

                               xmlns:custom="custom.*"

                               creationComplete="init()">

          

           <fx:Declarations>

           </fx:Declarations>

       

           <fx:Script>

                <![CDATA[

                     // a bunch of ActionScript code here

                ]]>

           </fx:Script>

       

           <s:Style source="AION.css"/>

           <s:ApplicationControlBar width="100%">

                <s:Label text="AION" color="0xFFFFFF" fontWeight="bold" fontSize="20"/>

           </s:ApplicationControlBar>

           <s:Spacer height="5"/>


          

           <s:VDividedBox width="100%" height="100%" liveDragging="true" dividerPress="paused=true" dividerRelease="paused=false">

               

                     <s:HDividedBox id="hd" width="100%" height="100%" liveDragging="true" dividerPress="paused=true" dividerRelease="paused=false">

                    

                               <custom:AIONPanel id="geocentricPanel" title="Geocentric View" width="100%" height="100%" reset="resetPanelSizes()" maximise="timelinePanel.height=0;heliocentricPanel.width=0">

                                         <local:GeocentricView id="geocentricView" orb="{GCOrbSlider.value}"/>

                                          <s:HSlider id="GCOrbSlider" value="2" minimum="0" maximum="10" bottom="10" left="10" liveDragging="true" showDataTip="false" visible="false"/>

                               </custom:AIONPanel>

       

                               <s:VBox minWidth="175" maxWidth="175" height="100%" horizontalAlign="center" horizontalCenter="true">

                                         <s:Tile id="checkBoxesTile" height="100%" width="100%">

                                         </s:Tile>

                                         <s:Label id="dateLabel" width="100%" color="0xFFFFFF" fontSize="13" horizontalCenter="true" textAlign="center"/>

                                         <s:DateField id="dateField" change="date=dateField.selectedDate" width="0" visible="false" includeInLayout="false"/>

                                         <s:HSlider id="speedSlider" change="speed=speedSlider.value" liveDragging="true"/>

                                         <s:Spacer height="7"/>

                               </s:VBox>

       

                               <custom:AIONPanel id="heliocentricPanel" title="Heliocentric View" width="100%" height="100%" reset="resetPanelSizes()" maximise="timelinePanel.height=0;geocentricPanel.width=0">

                                         <local:HeliocentricView id="heliocentricView" zoom="{HCZoomSlider.value}"/>

                                         <s:HSlider id="HCZoomSlider" value="1" minimum="0.6" maximum="25" bottom="10" right="10" liveDragging="true" showDataTip="false"/>

                               </custom:AIONPanel>

       

                     </s:HDividedBox>

       

                     <custom:AIONPanel id="timelinePanel" title="Timeline" maximise="hd.height=0" width="100%" height="100%" reset="resetPanelSizes()"/>

               

           </s:VDividedBox>

          

           <s:Image source="{fpsTimer}"/>

          

      </s:View>