6 Replies Latest reply on Oct 10, 2010 3:11 AM by whte_rabbit

    Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?

    coolfish2 Level 1

      I've managed to successfully create a FB4 "Flash Professional Project" by linking to a .FLA file, but when I try to link to a .XFL file (the other option when creating a Flash Professional Project in FB4), none of my code has any effect when the application is run in Flash Professional (CS5).

       

      Has anyone managed to get FB4 and Flash CS5 to integrate while using a .XFL format Flash file?

        • 1. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
          SunilAdobe Adobe Employee

          Yes, the XFL format is supported. I was able to use debug and Test movie from Flash Builder.

          Is there any error that you are getting? Or is there any dialog open in the background in Flash Pro when you do this?

           

          Thanks

          -Sunil

          • 2. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
            coolfish2 Level 1

            Hi Sunil,

             

            There are no errors reported (as far as I can tell). The problem is that none of my AS3 code written within the Flash Builder environment is executed when I've used an XFL file as the link to Flash CS5 Pro. However, if I perform *exactly* the same steps but use a .FLA file as the host Flash CS5 document, my AS3 code stored in the associated Flash Builder project is executed just fine.

            • 3. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
              Rui Silva Level 3

              Hi coolfish2,

               

              I got the same behavior from a fla and an xfl file from a Flash Builder project. Are you configuring correctly the source path and the document class in Flash Professional?

               

              Regards,

              Rui

              • 4. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
                coolfish2 Level 1

                Hi Rui,

                 

                Not quite sure about "correctly" configuring the source path and document class, but I am configuring both the .FLA and .XFL documents the same way and creating the Flash Builder project the same way (the only exception is that I select the .XFL file rather than the .FLA file).

                 

                I've not been able to find enough documentation to walk me through the process to know if I'm doing it the "Adobe expected" way.

                • 5. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
                  Rui Silva Level 3

                  The source code path has to be configured in Flash Pro to take into account the as files in the Flash Builder project. The document class also has to be defined in Flash Pro in order for the code in the base class to be run correctly. I guess you must have it configured correctly as you say everything works fine with the fla version.

                   

                  As I said, I could not replicate the problem on my side. I've made a simple example and tried using both fla and xfl without any problem whatsoever. Is there any way you could send me the files so that I could take a look at them?

                   

                  Regards,

                  Rui

                  • 6. Re: Can Flash Builder 4 Integrate with Flash Pro CS5 via .XFL File?
                    whte_rabbit

                    Hey coolfish2

                     

                    I ran into the same problem where *.fla projects were picking up the document class and *.xfl projects weren't.  This blog points to the problem http://blog.theflashblog.com/?p=1986 . Basically Builder puts the generated Document Class in the same directory as the *.xfl file, but flash loads the document class from the directory above.  Actionscript files in the *.xfl directory are never read.

                     

                    To get arround the problem I'd create the project as follows

                     


                    1.     Create your *.xfl, say called 'Example'; this creates the following folder structure

                     

                    ./Example
                    ./Example/Example.xfl
                    ./Example/ ...all the other stuff

                     

                    2.     Create the Flash Builder project as usual, it will create the document class file

                     

                    ./Example/Exampe.as

                     

                    3.     Create a src directory next to the Example directory e.g.

                     

                    ./Example
                    ./src

                     

                    4.     In Flash Builder right click on the project and select Properties.  Then select 'Actionscript Build Path' on the left hand side. Go to the 'Source Path' tab and use 'Add Folder' to select the src directory you've just created.

                     

                    5.     Move ./Example/Example.as into ./src/Example.as

                     

                    6.     Finally open up the Example.xfl and go to File->Publish Settings, go to the Flash tab and select "settings" next to "Actionscript 3.0".  Select the "Source Path" tab and change the folder with '.' to './src'.

                     

                    That should be it, if you haven't removed Example/Example.xfl then the button to 'Edit Class Definition' will still link to the wrong file.  I presume only a few people are having this problem as it seems quite a big issue to miss.  Anyway hope that helps

                     

                    theInbetweens