Skip navigation
sasthamangalam
Currently Being Moderated

HOW TO IDENTIFY ACTIONSCRIPT CODE TYPE DURING RUNTIME

Jun 22, 2009 3:19 AM

Is it possible to get the actionscript version of flash movie ie ,whether AS1.0 or AS2O or AS30 during runtime?

  • Currently Being Moderated
    Community Member
    Jun 22, 2009 5:48 AM

    What from someone elses movie? I don't think so...

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jun 22, 2009 7:51 AM

    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.

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jul 1, 2009 6:45 AM

    No I don't think so.

    Because seperate AVM i.e. AVM2 is developed by adobe specifically for AS3.0 code to run

    When AS2.0 launched AVM2 / AS3.0 was not even in picture.

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points