Is it possible to get the actionscript version of flash movie ie ,whether AS1.0 or AS2O or AS30 during runtime?
It is possible to detect at runtime whether a movie is of AVM1 type or AVM2 type.
AVM1 stands for all the movie clips targeted before the Flash Player 9. [AS1 or AS2]
AVM2 stands for the movie clips targeted on Flash player 9 or above. [AS3]
The follwoing code detects the version of the movie clip.
var img = _loader.getChildAt(0); //_loader is any loader object loading an external swf file.
if(img is AVM1Movie)
{
alert("avm1 movie....");
}
else
{
alert("avm2 movie...");
}
I don't think you can distinguish if the movieclip is of type AS1.0 or AS2.0; because at compile time the AS2.0 code gets converted to AS1.0 code.
Thank you SwapnilVJ .It is working.
North America
Europe, Middle East and Africa
Asia Pacific
Copyright © 2012 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).