Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Detect ActionScript and Flash player version of Published SWF

Guest
Sep 12, 2011 Sep 12, 2011

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

TOPICS
ActionScript
3.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 14, 2011 Sep 14, 2011

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

Translate
Mentor ,
Sep 12, 2011 Sep 12, 2011

This link to the Flash ActionScript Reference will get you started but it only gives you the FP version not the AS version...

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#ve...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 12, 2011 Sep 12, 2011

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2011 Sep 12, 2011

You can load the SWF with Loader and check if it's an AVM1Movie.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2011 Sep 13, 2011

The AVM1 movie load fine with the Loader object as well.. So i am not sure, what you mean by loading it through Loader?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2011 Sep 14, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 15, 2011 Sep 15, 2011

Thank

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2015 May 28, 2015
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines