4 Replies Latest reply on Oct 2, 2010 12:50 PM by pallav_theGreat

    Unable to import DataProvider

    PalacaJoe
      If I open a new Flash (AS3) file in Flash CS3 Professional and try to import DataProvider (import fl.data.DataProvider;), I consistantly receive a compiler error (1172: Definition fl.data:DataProvider could not be found). Does anyone know what the problem is?
        • 1. Re: Unable to import DataProvider
          Level 7
          AS3 Component source definitions are not, by default, located within the
          classpath of your FLA. They are available in the
          <lang>\Configuration\Component Source\ActionScript 3.0
          folder of your Flash CS3 instalation directory, however the components
          themselves rely on pre-compiled versions of those classes in what is known
          as the ComponentShim. This asset can be found in your library when you add
          a component to your library or screen from the components panel. Its
          located within the Component Assets > _private folder. Without this asset
          in your library, you will not have access to the component classes. And if
          you want to reference a component dynamically, it will need to be added to
          your library before you publish your SWF. The ComponentShim only contains
          the core AS classes, not the actual components which also rely on other
          graphics and movie clips which need to be in your library before a
          components can be used in your SWF

          "PalacaJoe" <webforumsuser@macromedia.com> wrote in message
          news:f2a9m7$lkm$1@forums.macromedia.com...
          > If I open a new Flash (AS3) file in Flash CS3 Professional and try to
          > import
          > DataProvider (import fl.data.DataProvider;), I consistantly receive a
          > compiler
          > error (1172: Definition fl.data:DataProvider could not be found). Does
          > anyone
          > know what the problem is?
          >


          • 2. Re: Unable to import DataProvider
            lkjhssdf

            I have the same problem.  The "answer" is absolutely meaningless and about as much use as a quote from the bible.  It may or may not be true, but doesnt help solve the problem.

             

            So how does one go about getting the DataProvider to be importable?

             

            "This asset can be found in your library when you add  a component to your library or screen from the components panel".

             

            So how do you add a component to your library?

             

            Ive added a "combobox" to my screen from the component panel, and that didnt help, so the second part of the above quote appears not to be true.

             

            There is no option in Flex Builder 3 to add anything to a library, only to add a new library via project->properties->Flex Build Path->Library Path.

             

            Anyone figured this out?

            • 3. Re: Unable to import DataProvider
              kglad Adobe Community Professional & MVP

              in as2:

               

              import mx.controls.listclasses.DataProvider

               

              (if you have an as3 issue, you should be posting in the as3 forum.)

              • 4. Re: Unable to import DataProvider
                pallav_theGreat

                Try dragging a DataGrid component to your library and import these classes:

                import fl.controls.DataGrid;
                import fl.data.DataProvider;

                 

                This will sort your problem

                ==================

                CHEERS

                Pallav Samaddar