Thanks Juan - I will try this out - the reason behind investigating this is for obfuscation; I'm interested in finding a way to load an asset into flash without triggering a standard http request (I guess URLLoader will trigger one). You're right about LoaderContext too - I think it needs to be set to the current context before you can read the byte data from the external file
On 8 Jun 2010, at 16:40, Juan Pablo Califano wrote: You don't need to use a socket for this. Load the data with a URLLoader, setting URLLoader.dataFormat to URLLoaderDataFormat.BINARY. You'll get a ByteArray. Pass that to Loader::loadBytes() wait for the complete event to fire and you're all set. Well, almost. If the loaded swf is in a different domain, you need a crossdomain. If I recall correctly, this case also involved some LoaderContext particular setup (can't remember the details, though). You don't need to do anything server-side if you are serving the swf as a normal file. Cheers Juan Pablo Califano 2010/6/8 Tom Gooding <t...@quickthinkmedia.co.uk> > Hi, > > Does anyone know how to get an external swf (hosted on a regular webserver) > into the Loader class - accessed via the low-level flash.net.Socket class > into a ByteArray. > > It seems this is possible, but I can't find any examples of how to handle > it either server side (we use Java here) or how the AS3 client would need to > work. > > I have found this which looks like it may have been relevant, but the files > have been taken down: http://www.bytearray.org/?p=32 > > If anyone has any ideas I'd appreciate it, > > Tom > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders