
Copy link to clipboard
Copied
Hi
I am looking for a way to find ActionScript and Flash player version of a published SWF using AS3 code?
Did google a lot, but didn't find anything relevant.
Thanks for help
1 Correct answer
Once loaded you can tell if it's an AVM1 movie or not, i.e.
trace(loader.content is AVM1Movie);
// true = AS1/2, false = AS3
Copy link to clipboard
Copied
This link to the Flash ActionScript Reference will get you started but it only gives you the FP version not the AS version...

Copy link to clipboard
Copied
Thanks for that link.
But is it possible to get the ActionScript version? Since there might be AS2 code bublished in FP 9 or above?
Copy link to clipboard
Copied
You can load the SWF with Loader and check if it's an AVM1Movie.

Copy link to clipboard
Copied
The AVM1 movie load fine with the Loader object as well.. So i am not sure, what you mean by loading it through Loader?
Copy link to clipboard
Copied
Once loaded you can tell if it's an AVM1 movie or not, i.e.
trace(loader.content is AVM1Movie);
// true = AS1/2, false = AS3

Copy link to clipboard
Copied
Thank
Copy link to clipboard
Copied
Pulling out what hair I have left over here. Whether I load an AS2 or AS3 SWF into my clip checkRevisedMC I get the same trace result "false"
I have an event listener for when the file has loaded:
fileRef.addEventListener(Event.COMPLETE, versionHandler);
// Function that fires off when upload is complete
function versionHandler(event:Event):void {
trace("versionHandler has been called");
trace(checkRevisedMC.content is AVM1Movie);
}
What am I missing over here? Thanks.

