• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

converting legacy code to Flash Builder 4.5

Contributor ,
Sep 03, 2011 Sep 03, 2011

Copy link to clipboard

Copied

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>

Views

794

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 05, 2011 Sep 05, 2011

Copy link to clipboard

Copied

LATEST

There's no spark HDividedBox yet. Use the mx one.

Instead of mx:Tile, use a s:Group with s:layout set to TileLayout:

<s:Group>

<s:layout>

<s:TileLayout />

</s:layout>

<!-- other children here -->

</s:Group>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines