Reputation: 19476
Is it possible to read the SWF version
of a loaded SWF into a main one?
var mcl:Loader = new Loader();
mcl.contentLoaderInfo.addEventListener (Event.COMPLETE, prepareDisplay(mcl));
mcl.load (new URLRequest ('movie.swf'));
function prepareDisplay (mcl:Loader):Function {
return function (e:Event):void {
mcl.contentLoaderInfo.removeEventListener (Event.COMPLETE, prepareDisplay);
media_container.addChild(mcl);
// how can I get the loaded swf version from here?
}
}
Upvotes: 1
Views: 326
Reputation: 3581
You can use this utility class to get the version information from the player you are using or the flash version of the compiled swf.
https://github.com/jamestomasino/tomasino/blob/master/org/tomasino/utils/Version.as
Just use:
var compiledSwfVersion:int = Version.COMPILE_FLASH_VERSION;
Upvotes: 0
Reputation: 534
You should be able to check the swfVersion property of the Loaders contentLoaderInfo LoaderInfo object.
trace(mcl.contentLoaderInfo.swfVersion);
Constants can be used from: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/SWFVersion.html
Upvotes: 1