14 Replies Latest reply on Jun 19, 2009 2:51 AM by Tim John

    How to run another application in the project?

    Holomew Level 1
      Well, the title says it all really. I created a new application within my existing project but I can't get it to run as it always runs my main application (which has a little blue sphere on its icon).

      How can I get the other application to test and/or run?
        • 1. How to run another application in the project?
          Peter Lorent Level 2
          Project -> Properties -> Flex Applications -> Add -> add the new application -> if applicable set the default application (assuming you use FB)
          • 2. How to run another application in the project?
            Holomew Level 1
            I know how to add it but the application won't create the necessary files in the bin-debug folder to show it.

            Is there any way to make the application rebuild the items in this folder? I deleted everything in it and when it runs it won't work because the html file (or swf if you turn the wrapper off) isn't there.

            I tried manual build also and nothing.

            I think my real questions is how do I get the app to rebuild in the bin-debug folder?


            Edit: This might be because it says I have errors in the required project but I don't see any errors anywhere even if I strip the application down to nothing. :(
            • 3. How to run another application in the project?
              Peter Lorent Level 2
              Managing launch configurations
              Launch configurations are used both to run and to debug applications. Flex Builder provides a default launch configuration for Flex and ActionScript applications. When you first run or debug a project, a project-specific launch
              configuration is created. You edit the launch configuration to change the default main application file. You can also
              modify the default launch path to run or debug in the stand-alone Flash Player rather than in a web browser.
              Creating or editing a launch configuration
              When you create and build a project, it is ready to be run or debugged. Both running and debugging of the applica-
              tions in your project are controlled by a launch configuration. By default, Flex Builder creates a launch configuration for each of the application files in your project the first time you run or debug them. The configurations are based on the default Flex application configuration, and you can edit them as necessary.
              Launch configurations are managed in the Create, Manage, and Run Configurations dialog box.

              using_fb_flex3.pdf
              Chapter 11: Running and Debugging Applications
              • 4. Re: How to run another application in the project?
                Gregory Lafrance Level 6
                Right click the new application in the Flex Builder Navigator pane and select Set as Default Application.
                • 5. Re: How to run another application in the project?
                  Peter Lorent Level 2
                  >>Is there any way to make the application rebuild the items in this folder? I deleted everything in it and when it runs it won't work because the html file (or swf if you turn the wrapper off) isn't there.

                  Yes. Project -> Properties -> Compiler -> disable option html wrapper and copy non-embedded files to output directory. -> ok

                  Project - Properties -> Compiler -> enable the mentioned options again -> ok
                  • 6. Re: How to run another application in the project?
                    Holomew Level 1
                    quote:

                    By default, Flex Builder creates a launch configuration for each of the application files in your project the first time you run or debug them. The configurations are based on the default Flex application configuration, and you can edit them as necessary. Launch configurations are managed in the Create, Manage, and Run Configurations dialog box.


                    Yes, but is there any way to create this again? I deleted the contents of that directory (bin-debug) and can't recreate it.
                    • 8. How to run another application in the project?
                      Holomew Level 1
                      Thank you.

                      I'm thinking there is an error somewhere that is not making this compile correctly (or in my case, at all).

                      I did as you suggested and when it rebuilt the bin-debug folder it only created an asset folder I'm using and not the html and swf files.

                      It doesn't tell me what the error is nor do I have any red x's in my code anywhere.

                      If I try to run the app it says, "Errors exist in required project(s): app name, Proceed with launch?" and if I click "Proceed" I get:

                      Launch Failed
                      File not found:
                      --->bin-debug/appName.html (obviously because it's not creating it).

                      Sigh. :(


                      Edit: Actually, I'm finding now that this is happening with ALL of my Flex projects.
                      • 9. Re: How to run another application in the project?
                        Peter Lorent Level 2
                        I just deleted the contents of the bin-debug and html-template directories and get the same error. Using the method I described I can restore the bin-debug and html-template directories. And the project builds again.

                        You still have bin-debug as your standard output folder under Project -> Properties -> Build Path ?
                        • 10. Re: How to run another application in the project?
                          Holomew Level 1
                          quote:

                          I just deleted the contents of the bin-debug and html-template directories and get the same error. Using the method I described I can restore the bin-debug and html-template directories. And the project builds again. You still have bin-debug as your standard output folder under Project -> Properties -> Build Path ?


                          Yes, it's selected as my output folder. But are you getting the first error that says you have errors in your project before you get the build error?

                          I can't figure out why this is happening on all of my Flex projects now.
                          • 11. Re: How to run another application in the project?
                            Peter Lorent Level 2
                            No, I don't. On all your projects? Hmm, something changed in the preferences, maybe? Is the correct SDK still targeted? Can you clean a project? Do a clean build?
                            • 12. Re: How to run another application in the project?
                              Holomew Level 1
                              I just started over with a new project and copy and pasted what I needed. This is the second time this has happened to me though and I'm not sure what the deal is.

                              Thanks for your help anyhow though, I really appreciate your time.
                              • 13. Re: How to run another application in the project?
                                lifecanon.com Level 1
                                hi Holomew , i had the same problem, my way to get over it was to delete everything in the bin-debug folder, restart my comp, reopen flex, and after the restart it seems to be generating all the files to the bin-debug folder...if it still doesn't work try another reebot after it generates the content of the bin-debug(without deleting the content again), its not the best solution but worked for me...the problem is that sometimes it just doesn't copy everything to the bin-debug folder, it only works if you reboot, dono why... :(
                                • 14. Re: How to run another application in the project?
                                  Tim John Level 1

                                  I just managed to fix the same problem with my project with Project > Clean...

                                   

                                  This will rebuild the lot.