This is why MultiLoader didn't work in Air. Explanatory comment below.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5397 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -128,6 +128,17 @@ public class MultiLoader
|
|||||||
}
|
}
|
||||||
var l :Loader = new Loader();
|
var l :Loader = new Loader();
|
||||||
var lc :LoaderContext = new LoaderContext(false, appDom);
|
var lc :LoaderContext = new LoaderContext(false, appDom);
|
||||||
|
try {
|
||||||
|
// In Air players, LoaderContext has an additional property that dictates whether
|
||||||
|
// a Loader is allowed to load bytes that contain executable code (SWFs). Since
|
||||||
|
// that is the default for non-air runtimes, and that is the expected behavior
|
||||||
|
// for MultiLoader, we set the property to true if it's found in the current
|
||||||
|
// runtime's LoaderContext.
|
||||||
|
Object(lc)["allowLoadBytesCodeExecution"] = true;
|
||||||
|
} catch (err :Error) {
|
||||||
|
// throw this away, it merely indicates the property was not found on the
|
||||||
|
// LoaderContext.
|
||||||
|
}
|
||||||
// now we only need handle the two cases
|
// now we only need handle the two cases
|
||||||
if (source is URLRequest) {
|
if (source is URLRequest) {
|
||||||
l.load(URLRequest(source), lc);
|
l.load(URLRequest(source), lc);
|
||||||
|
|||||||
Reference in New Issue
Block a user