5 Replies Latest reply on Jun 15, 2009 11:26 AM by Handycam

    Import fxp as a componant?

    PaulRaye

      Is it possible to import an fxp file into a existing project in Flash Builder as a component?  Or can anyone thing of a work around to make this doable?

       

      Of coarse the second part of the question would be is there a way, from inside of Flash Catalyst, to make the component throw events?

       

      It would seem to me that if you could create custom components in Catalyst with custom events, those components could be brought into larger flex projects with all the programming done off the events. Then the designers could make changes to their hearts content to the component with out mucking up the programming.

       

      Seems like we are so close to this am I missing something?

       

      Paul

        • 1. Re: Import fxp as a componant?
          winsha C Adobe Employee

          You can use "File>Export Library Project..." in Catalyst and then import the fxpl into Flash Builder.

           

          Winsha

          • 2. Re: Import fxp as a componant?
            Handycam Level 1

            winsha C wrote:

             

            You can use "File>Export Library Project..." in Catalyst and then import the fxpl into Flash Builder.

             

            Winsha

            How does one "import the fxpl into Flash builder"?

             

            I tried "import", but it wants to import is as a project of its own; I see no option to import it as a component.

             

            If I choose to import it to the existing project directory (i.e. where I want the component) it warns of replacing files.  If I ignore the warning and proceed, it does not import the code from FC, but does erase the html-template folder.

             

            Please elaborate on this process.

            • 3. Re: Import fxp as a componant?
              Terl2424 Level 1

              Import it as a separate project, then in your main project go to Properties (right-click on the project) and choose Flex Build Path, select Library path, and click the Add Folder button and choose the imported project. The components will now be available to your main project.

              • 4. Re: Import fxp as a componant?
                Handycam Level 1

                Thank you.

                 

                But why am I getting errors from the buttons and such from the FXPL file?

                 

                I have added it to the main application as:  <src:Main />

                 

                It shows up file when run, but clicking anything gives me:

                 

                ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
                at flash.display::DisplayObjectContainer/getChildIndex()
                at mx.managers::SystemManager/getChildIndex()[E:\dev\beta1\frameworks\projects\framework\src\mx\managers\SystemManager.as:1840]
                at mx.managers::SystemManager/mouseDownHandler()[E:\dev\beta1\frameworks\projects\framework\src\mx\managers\SystemManager.as:3842]
                
                

                • 5. Re: Import fxp as a componant?
                  winsha C Adobe Employee

                  Once you have exported the components as a component library project, then you import in into Flash Bluilder as a separate component library project. You will then need to add the library project to your applications build library path by:

                  1. With a project selected in the Flex Navigator view, select Project > Properties > Flex Build Path.
                  2. Select the Library Path tab, and then select "Add Project..."
                  3. Select your imported library projec
                  4. Click ok and ok

                  Having a separate library project lets you share  custom components between multiple application/projects and between multiple developers.