Charles (www.charlesproxy.com) is a great way to view/intercept network
traffic (captures request/response information). Another tool that provides
essentially the same thing is Service Capture (www/
kevinlangdon.com/serviceCapture).

Module associations are setup in the projects properties (Flex Modules tab),
but can be written/compiled separately (create a new project and set the
default application to point to the module file, discarding the application
file).

If your external swfs are being served outside the local sandbox (server
based) amke sure your crossdomain.xml file is present and valid.

On Fri, Oct 22, 2010 at 7:47 AM, Laurence MacNeill
<[email protected]>wrote:

> Relative URL's give me a File Not Found error, so I'm definitely using a
> full URL (just take a look at my code from the first e-mail I sent - you'll
> see where I'm forming the complete URL.)
>
> But you're correct in that the "app:/" part does suggest it's looking on
> the local server...  Which it shouldn't be doing...
>
> What is this "Charles" thing you speak of?  Never heard of it -- sounds
> useful, tho.
>
> And the swf's I'm trying to load are all <mx:Application>, not <mx:Module>
> -- is that perhaps the problem?  I couldn't get Flash Builder to compile any
> <mx:Modules> into .swf files...  Or am I doing that wrong?  If it's a
> <mx:Module> do you load it a different way (i.e. using something other than
> the Loader class to load it)?  I've never done this type of thing before
> (loading another program into a running program), so I'm a newbie when it
> comes to this stuff...
>  L.
> On Fri, Oct 22, 2010 at 9:07 AM, Scott Talsma <[email protected]>wrote:
>
>> It sounds like your urls are not what you think they are.  If you are
>> using relative pathing in an AIR application, it might try to load
>> everything from the local box.  Can you probably fire up Charles and
>> proxy all the requests that AIR is making.  You should see the
>> requests for your modules going out to the server.  But the "app:/"
>> suggests to be that you are not going to the server; instead it is a
>> local request.
>>
>> You may need to hard-code (in source code or in an xml config) the
>> location of the modules you load so that you get a full non-relative
>> url. The other think you can look into is using the url of the swf you
>> are loading (look at its loaderInfo prop) to determine where the swf
>> came from, and then use that to create a URL for the module.
>>
>> BTW, I assume that in the above post, the term module is referring to
>> <mx:Module/>.
>>
>> On Thu, Oct 21, 2010 at 7:14 PM, Laurence MacNeill
>> <[email protected]> wrote:
>> > Ok -- I had to put the child SWF file in the same folder as the parent
>> SWF
>> > file -- then it loaded fine.  But that's going to cause a lot of
>> headaches
>> > -- I need to be able to load the .SWF from another folder...  Any ideas?
>> >
>> > L.
>> >
>> >
>> > On Thu, Oct 21, 2010 at 6:52 PM, Laurence MacNeill <
>> [email protected]>
>> > wrote:
>> >>
>> >> I found the following post on a blog: "The problem was with
>> mis-locating
>> >> the SWF modules. As soon as appropriate location was set for generated
>> SWF
>> >> modules - the error disappear."   What does that mean, exactly?
>> >>
>> >> L.
>> >>
>> >> On Thu, Oct 21, 2010 at 6:41 PM, Laurence MacNeill
>> >> <[email protected]> wrote:
>> >>>
>> >>> Nope -- tried it with SWFLoader.  Same results.  :-(  This is really
>> >>> pissing me off...  It *SHOULD* be working.  But it just isn't...
>> >>>
>> >>>
>> >>> L.
>> >>>
>> >>>
>> >>> On Thu, Oct 21, 2010 at 6:33 PM, Laurence MacNeill
>> >>> <[email protected]> wrote:
>> >>>>
>> >>>> Am I perhaps doing this wrong?  Should I use SWFLoader instead of
>> >>>> Loader?  When I Google the error, I keep finding instructions on how
>> to
>> >>>> fix my flash movie in CS3 or something completely unrelated to what
>> I'm
>> >>>> doing here -- but this is a flex program, not a flash movie.  Maybe
>> that's
>> >>>> the issue?
>> >>>>
>> >>>> L.
>> >>>>
>> >>>>
>> >>>> On Thu, Oct 21, 2010 at 6:17 PM, Laurence MacNeill
>> >>>> <[email protected]> wrote:
>> >>>>>
>> >>>>> I added
>> >>>>> "loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
>> >>>>> displayError);"  and created a displayError function to go with it.
>> When I
>> >>>>> trace the event that gets passed to displayError, I get the same
>> "Error
>> >>>>> #2036: Load Never Completed. URL: http://[my
>> >>>>> domain]/QMS_test/printing_2010_iwcs.swf "  (And when I deliberately
>> use an
>> >>>>> incorrect URL, I get "IOErrorEvent:. text=Error #2035: URL Not
>> Found." which
>> >>>>> is the 404 error you mentioned, yes?)
>> >>>>>
>> >>>>> Oddly enough -- the loaderURL listed in that event-trace is
>> >>>>> "app:/QMSPrintAssist.swf".  Could that be the problem?  How is it
>> becoming
>> >>>>> set so weirdly?
>> >>>>>
>> >>>>> L.
>> >>>>>
>> >>>>> On Thu, Oct 21, 2010 at 6:03 PM, Scott Talsma <
>> [email protected]>
>> >>>>> wrote:
>> >>>>>>
>> >>>>>> I would suggest adding an error listener to your loader.  Then you
>> can
>> >>>>>> echo out the error message contained in the event.
>> >>>>>>
>> >>>>>> Most likely, you are getting a 404 on the load.
>> >>>>>>
>> >>>>>> On Thu, Oct 21, 2010 at 5:56 PM, Laurence MacNeill
>> >>>>>> <[email protected]> wrote:
>> >>>>>> > Why am I getting the following error: "Error #2044: Unhandled
>> >>>>>> > IOErrorEvent:.
>> >>>>>> > text=Error #2036: Load Never Completed." when given the following
>> >>>>>> > code in an
>> >>>>>> > AIR 2.0 app:
>> >>>>>> >
>> >>>>>> > import mx.core.UIComponent;
>> >>>>>> >
>> >>>>>> > private var loader:Loader;
>> >>>>>> > private var printSWF:MovieClip;
>> >>>>>> > private var swfTimer:Timer;
>> >>>>>> >
>> >>>>>> > private function init(): void {
>> >>>>>> >          loadPrintingApp( "[my domain removed]", "QMS_test",
>> >>>>>> > "2010_iwcs");
>> >>>>>> > }
>> >>>>>> >
>> >>>>>> > public function loadPrintingApp(domainName:String,
>> >>>>>> > loginFolderName:String,
>> >>>>>> > showFolderName:String): void {
>> >>>>>> >         var request:URLRequest = new URLRequest( "http://"; +
>> >>>>>> > domainName +
>> >>>>>> > "/" + loginFolderName + "/printing_" + showFolderName + ".swf");
>> >>>>>> >         loader = new Loader();
>> >>>>>> >          loader.load(request);
>> >>>>>> >
>> loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
>> >>>>>> > loadIt);
>> >>>>>> >         var myUIComponent:UIComponent = new UIComponent();
>> >>>>>> >          myUIComponent.addChild(loader);
>> >>>>>> >          addChild(myUIComponent);
>> >>>>>> > }
>> >>>>>> >
>> >>>>>> > private function loadIt(event:Event): void {
>> >>>>>> >         swfTimer = new Timer(10);
>> >>>>>> >          swfTimer.addEventListener(TimerEvent.TIMER, swfCheck);
>> >>>>>> >          swfTimer.start();
>> >>>>>> > }
>> >>>>>> >
>> >>>>>> > private function swfCheck(event:TimerEvent): void {
>> >>>>>> >         printSWF = new MovieClip();
>> >>>>>> >         printSWF = loader.content as MovieClip;
>> >>>>>> >         if (printSWF.application != null ) {
>> >>>>>> >                   swfTimer.stop();
>> >>>>>> >                   printSWF.application.showName = "2010_iwcs";
>> >>>>>> >         }
>> >>>>>> > }
>> >>>>>> >
>> >>>>>> > In the code above, the init() function is run on the
>> >>>>>> > applicationComplete
>> >>>>>> > event...
>> >>>>>> >
>> >>>>>> > The swf file that I'm trying to load is very simple, it contains
>> >>>>>> > only the
>> >>>>>> > following:
>> >>>>>> >
>> >>>>>> > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml "
>> >>>>>> > minWidth=" 400"
>> >>>>>> > minHeight=" 300" >
>> >>>>>> >
>> >>>>>> >          <mx:Script>
>> >>>>>> >                  <![CDATA[
>> >>>>>> >                  [ Bindable ] public var _showName:String;
>> >>>>>> >
>> >>>>>> >                  public function set showName(s:String): void {
>> >>>>>> > _showName =
>> >>>>>> > s; }
>> >>>>>> >                  ]]>
>> >>>>>> >          </mx:Script>
>> >>>>>> >
>> >>>>>> >          <mx:Label x="10 " y="10 " text="Print Assist for
>> {_showName
>> >>>>>> > }
>> >>>>>> > loaded!" />
>> >>>>>> >
>> >>>>>> > </mx:Application>
>> >>>>>> >
>> >>>>>> >
>> >>>>>> > So basically, if this all loads correctly, I should have an AIR
>> app
>> >>>>>> > that
>> >>>>>> > shows a blank screen, except for the words "Print Assist for
>> >>>>>> > 2010_iwcs
>> >>>>>> > loaded!".  Simple enough -- yet it won't work...  And I R
>> >>>>>> > Confused!   :-)
>> >>>>>> >
>> >>>>>> > Thanks for any help you can give me.
>> >>>>>> >
>> >>>>>> > Laurence MacNeill
>> >>>>>> > Mableton, Georgia, USA
>> >>>>>> > -------------------------------------------------------------
>> >>>>>> > To unsubscribe from this list, simply email the list with
>> >>>>>> > unsubscribe in the
>> >>>>>> > subject line
>> >>>>>> >
>> >>>>>> > For more info, see http://www.affug.com
>> >>>>>> > Archive @ http://www.mail-archive.com/discussion%40affug.com/
>> >>>>>> > List hosted by http://www.fusionlink.com
>> >>>>>> > -------------------------------------------------------------
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> Scott Talsma
>> >>>>>> CTO, echoEleven
>> >>>>>>
>> >>>>>>
>> >>>>>> -------------------------------------------------------------
>> >>>>>> To unsubscribe from this list, simply email the list with
>> unsubscribe
>> >>>>>> in the subject line
>> >>>>>>
>> >>>>>> For more info, see http://www.affug.com
>> >>>>>> Archive @ http://www.mail-archive.com/discussion%40affug.com/
>> >>>>>> List hosted by http://www.fusionlink.com
>> >>>>>> -------------------------------------------------------------
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>
>> >>>
>> >>
>> >
>> >
>>
>>
>>
>> --
>>  Scott Talsma
>> CTO, echoEleven
>>
>>
>> -------------------------------------------------------------
>> To unsubscribe from this list, simply email the list with unsubscribe in
>> the subject line
>>
>> For more info, see http://www.affug.com
>> Archive @ http://www.mail-archive.com/discussion%40affug.com/
>> List hosted by http://www.fusionlink.com
>> -------------------------------------------------------------
>>
>>
>>
>


-- 
Darin Kohles
Adobe Certified Developer

Reply via email to