bennyxqg / bulk-loader

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

getDisplayObjectLoader returns null from nested SWF on server. (works locally.) #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>What steps will reproduce the problem?

var myContext : LoaderContext = new
LoaderContext(false,ApplicationDomain.currentDomain); 

bulkLoader.add("assets/swf/exp_s_w.swf", {id:"exp_s_w", context: myContext});       

... (swf is loaded fine.) ...
gameStates.bulkLoader.getDisplayObjectLoader('assets/swf/exp_s_w.swf'));

>What is the expected output? What do you see instead?

expect: [object ApplicationDomain]
seeing: null

>What version of the product are you using? On what operating system?

I just did a svn download this week.  How can I see in the directory what
version, though?  I can't locate code comment references to version.

>Please provide any additional information below.

I imagine this issue to be either an incomplete bug fix or an issue with my
LoaderContext passing.

Original issue reported on code.google.com by percentjuice on 27 Jan 2010 at 3:32

GoogleCodeExporter commented 9 years ago
found the revision number:

Revision: 313
Last Changed Date: 2009-10-31 06:11:09 +0100 (Sa, 31 Okt 2009)

Original comment by percentjuice on 27 Jan 2010 at 5:22

GoogleCodeExporter commented 9 years ago
FYI was having a similar bug trying to load in image content. Locally, testing 
via
Flash IDE the app performed as expected. On the server, I was expecting to 
receive a
Bitmap object but instead received a Loader object. Pulled my hair out for a 
bit and
then started tweaking the image path. Originally was something like
"http://foo.bar/image.jpg" then switched to "http://www.foo.bar/image/jpg" and
problem was resolved... not sure if this could help with your problem but worth
mentioning.

Original comment by christia...@gmail.com on 28 Jan 2010 at 2:56

GoogleCodeExporter commented 9 years ago
thanks so much for your condolences.  I was attempting to access the Child 
swf's Class Library.  I ended up 
using:

bulkLoaderInst.getMovieClip('myKey').loaderInfo.applicationDomain.getDefinition(
'myLibraryClass'));

intriguingly, setting or not setting the LoaderContext had no effect.

Original comment by percentjuice on 28 Jan 2010 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by debert on 29 Jan 2010 at 12:50

GoogleCodeExporter commented 9 years ago
I ran into this same issue or so I thought. Since this thread is the only one I 
was able to find on the matter I thought I would leave a note to what I saw and 
how I was able to fix it.

I have a bulkLoader instance set to load some external swfs then when those are 
done the complete handler fires off a method that will load some more swfs. It 
is this second bulkLoad I was getting a null for applicationDomain. In tracing 
the error I saw that my 1st complete handler was getting called twice. Turns 
out I was not removing the listener after the first set of files loaded so when 
the other files load both complete handlers were getting called and causing my 
issue.

Once I removed the complete listener everything started to work as expected.

Original comment by aspentre...@gmail.com on 2 Dec 2011 at 6:34