1 Reply Latest reply on May 28, 2008 7:04 AM by Gregory Lafrance

    Add .as component - How To?

    Frank_Phillips
      All,

      Please help a newbie... I am attempting to add a third party .as component to my Flex project but always get a 1046 error. I've attempted this with several components and always get the same results. What are the correct steps to make this work? One example is the FIG pan/zoom component. Thanks for any help you can offer.

      Frank
        • 1. Re: Add .as component - How To?
          Gregory Lafrance Level 6
          Make sure you define the namespace and/or import the required classes:

          <?xml version="1.0"?>
          <!-- intro\StateComboBox.mxml -->

          <!-- Specify the root tag and namespace. -->
          <mx:ComboBox xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:dataProvider>
          <mx:String>AK</mx:String>
          <mx:String>AL</mx:String>
          <!-- Add all other states. -->
          </mx:dataProvider>
          </mx:ComboBox>
          -------------------------------------------------------------
          <?xml version="1.0"?>
          <!-- intro/IntroMyApplication.mxml -->

          <!-- Include the namespace definition for your custom components. -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:MyComp="*">

          <!-- Use the filename as the MXML tag name. -->
          <MyComp:StateComboBox/>

          </mx:Application>