4 Replies Latest reply on May 17, 2007 6:39 AM by codetale

    Flex2 component in Flash9 (CS3)

    codetale
      i have create a "classes" library in Flex2 and compiled it to MyLibrary.SWC
      (this SWC contain no GUI, just helper classes)

      in Flex2, we can use the MyLibrary.SWC in any project just linking/add the SWC in [ActionScript Build Path],
      in the [ActionScript Build Path], we can chose the [Link Type] either "Merged into Code" or "External"
      with "Merged into Code" option select, when compile the project, it will merged the used class into project's code.

      my question is:
      how we use the MyLibrary.SWC in Flash9, and merged the package and classes in MyLibrary.SWC into Flash9 project.
      i have try copy the SWC into Flash9 component folder, but it never show in components panel.
      (but others SWC with GUI created with flash9 show up in the component panel)
      %HOMEPATH%\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\Components

      i also try to copy the MyLibrary.SWC into
      $Flash_Installed_Path\en\Configuration\ActionScript 3.0\Classes
      together with the playerglobal.swc
      but i have no idea how to ask Flash9 to link/load the SWC

      any idea?

      thankyou
        • 1. Re: Flex2 component in Flash9 (CS3)
          Karl_Sigiscar_1971 Level 3

          Hello,

          A guy from Adobe Consulting told me that you can point to a folder containing SWC files or directly to a SWC in Publish Settings > ActionScript 3.0 > Settings > Classpath as opposed to pointing to a folder with .as files (which a SWC is made of anyway).

          Give it a try.

          Best regards,
          Karl Sigiscar.
          • 2. Re: Flex2 component in Flash9 (CS3)
            codetale Level 1
            by pointing to the containing SWC folder...
            Flash9 seem able to detect the component's classes definition, but it not compiled/merged into swf
            i get class not found error when testing the movie.

            by direct pointing to SWC, strange thing happen, seem all code not running even there only single line of trace("test");
            abd no error.
            • 3. Flex2 component in Flash9 (CS3)
              Karl_Sigiscar_1971 Level 3
              OK, then. I found this area in the Flash documentation about making data binding classes available at runtime. You should be able to do the same with your SWC:

              Making data binding classes available at runtime

              To add the SWC files to your library:

              1.

              - Confirm that your Publish Settings specify ActionScript 3.0.
              - Select the Classes library (Window > Common Libraries > Classes).

              2.

              - Open the library for your document (Window > Library).
              - Drag the appropriate SWC files (DataBindingClasses, WebServiceClasses, or both) from the Classes library into your document's library.

              • 4. Re: Flex2 component in Flash9 (CS3)
                codetale Level 1
                thankyou,

                but where should i place my SWC so that it will show up in Classes library (Window > Common Libraries > Classes)?