Dynamically loading AS2 file into AS3 - how to determine if file is AS2
I have a Flash program that dynamically loads AS2 and AS3 SWF files using the same function. I'm trying to convert all AS2 files to AS3, but I don't have FLA for some, so they will need to stay AS2.
What I need to do is if the download is AS3 file, I need to run an additional set of code to set up some interactive functionality. If it's AS2, I just want to load it.
What would be the code to check if a dynamically loaded SWF file is AS2?
thanks
Update. It looks like actionScriptVersion is what I'm looking for, but it doesn't work as I expected. I have some code:
trace(loader.loaderInfo.actionScriptVersion);
But when I try to upload a file, I know it is AS2, I get 3 instead of 2. Am I using this code incorrectly?
a source to share
Check the actionscriptVersion property of the loaderInfo property of the loaded content:
http://livedocs.adobe.com/flex/2/langref/flash/display/LoaderInfo.html#actionScriptVersion
a source to share