bennyxqg / bulk-loader

Automatically exported from code.google.com/p/bulk-loader
0 stars 0 forks source link

Allow access to the applicationDomain of loaded swfs #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I just ran into a problem where I needed to access the applicationDomain of
an swf I loaded through BulkLoader (to attach clips from it's library as
described at
http://darylteo.com/blog/2007/11/16/abstracting-assets-from-actionscript-in-as30
-asset-libraries/
).

I couldn't see a built in way to do it so I made the change as shown in the
attached patch. Not sure if it's necessarily the best way but it would be
nice if this parameter was somehow exposed (or maybe even the whole
contentLoaderInfo object would make more sense?).

Cheers,

Kelvin :)

Original issue reported on code.google.com by kelvin.l...@gmail.com on 16 Jan 2008 at 3:45

Attachments:

GoogleCodeExporter commented 9 years ago
My bad - ignore the above... It looks like you can just as easily do:

BulkLoader.getLoader(X).getContent('Y').loaderInfo.applicationDomain

Dunno why I didn't see that at first!

Cheers,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 16 Jan 2008 at 6:01

GoogleCodeExporter commented 9 years ago
Hi Kelvin.

Note that the <bulkLoader>.add method will take a Context object as a property, 
which
will allow you to setup you application domains correctly.

var myContext : LoaderContext = new LoaderContext();
myContext.applicationDomain = ApplicationDomain.currentDomain;
loader.add("some.swf", "context": myContext);

Cheers
Arthur

Original comment by debert on 16 Jan 2008 at 6:08