2 Replies Latest reply on Sep 27, 2006 6:44 PM by sagacitysolutions

    FB Debug application loaded with SWFLoader

      I am fairly new to flex builder, I am working on a fairly large project that has many pages. To reduce the application sizes, I have created seperate applications for each type of user. The login page then loads the appropiate application useing SWFLoader. When I try to debug the application by setting a breakpoint within my application and start the login page, my breakpoint never breaks. Does anyone know anything about this, or how I would debug an application loaded this way. Just a note, I cannot run the loaded application without the login applicaiton being loaded first. The login app contains data that the secondary application needs.
        • 1. Re: FB Debug application loaded with SWFLoader
          mike_morearty Level 1
          Most likely the issue here is that the SWF that you are loading with the <SWFLoader> tag was not built for debugging.

          E.g. say you have a project called MyComponent, and then the main project called MyApp. Inside MyApp.mxml you have this:

          <mx:SWFLoader source="MyComponent.swf" />

          And presumably you manually copied MyComponent.swf from MyComponent/bin into the MyApp project. Well, the MyComponent project built two versions of the SWF: MyComponent.swf, which is the release version, and MyComponent-debug.swf, which is the debug version.

          So if you need to debug it, you'll have to copy MyComponent-debug.swf over to the MyApp project. To get it to load with the SWFLoader tag, you'll either need to temporarily change the filename in the SWFLoader tag to refer to MyComponent-debug.swf, or else rename the debug SWF to the release filename of MyComponent.swf.

          Unfortunately there is no automated workflow to have SWFLoader detect whether it is running debug or release, and load a different SWF.
          • 2. FB Debug application loaded with SWFLoader
            sagacitysolutions Level 1

            Thank you, that makes sense. I will make my own work arround to load the debug version of the SWF.

            I have been scratching my head for two weeks on this.

            Thanks again for your clear, complete and concise response to my question.