4 Replies Latest reply on Apr 6, 2010 11:58 PM by imdfl

    Howto: a minimal as3 application with spark components

    imdfl Level 1

      Hi all,

       

      I'm trying to build a minimal actionscript appliction with the spark.components.TextInput component. I want it as simple as creating a TextInput and placing it in the main sprite.

      I'm working in FlexBuilder 3 using The Flex SDK 4 release.

      After adding the spark.swc and the appropriate locale resource bundle, the application compiles. However, when I run it I get a 1014 verify error, stating that the class spark.components.TextInput was not found.

      I made sure that the various swc files were marged into the code. What else should I do in order to get this thing running?

        • 1. Re: Howto: a minimal as3 application with spark components
          Flex harUI Adobe Employee

          Generate a -link-report to make sure all of the classes you needed got in

          the SWF.

           

          FWIW, I'm not sure your configuration is supported

          • 2. Re: Howto: a minimal as3 application with spark components
            imdfl Level 1

            Thanx for the quick reply.

            I don't really understand the mechanism that can cause a compiler/sdk combo not to work, unless new flags are needed or new data formats have been introduced. Is this the case here?

            Here's the dump from link-report:

             

            <report>
              <scripts>
                <script name="_CompiledResourceBundleInfo-generated.as" mod="1270576728241" size="601" optimizedsize="306">
                  <def id="_CompiledResourceBundleInfo" />
                  <pre id="Object" />
                  <dep id="AS3" />
                </script>
                <script name="Y:\Current Version\ProjectNew\tester\src\Tester.as" mod="1270557888423" size="622" optimizedsize="367">
                  <def id="Tester" />
                  <pre id="flash.display:Sprite" />
                  <dep id="spark.components:TextInput" />
                  <dep id="AS3" />
                </script>
              </scripts>
              <external-defs>
                <ext id="AS3" />
                <ext id="spark.components:TextInput" />
                <ext id="flash.display:Sprite" />
                <ext id="Object" />
              </external-defs>
            </report>
            
            • 3. Re: Howto: a minimal as3 application with spark components
              Flex harUI Adobe Employee

              TextInput is external for some reason.  There may be assumptions in Flex

              Builder 3 about which libraries are externalized or maybe your setup is

              incorrect.  Are you sure you didn't specify the SWC as an external SWC?

              • 4. Re: Howto: a minimal as3 application with spark components
                imdfl Level 1

                I've added -static-rsls to the compiler flags and the program runs. I don't see anything onscreen - now it's time to find out how to use spark controls -  but the textinput exists.