flash language_api_virtual_machines
Virtual Machines
ActionScript code is interpreted by a part of the Flash player called the virtual machine. It’s this part that transcribes the binary code into machine language (ActionScript byte code) generated by the compiler.
The previous versions of Flash player integrated a single virtual machine called AVM1 which interpreted code from ActionScript 1 and 2. In reality, the binary code generated by the ActionScript 1 and 2 compiler was the same which is the reason why these two languages can work together in the same project.
The virtual machine 1 (AVM1) in Flash 8:
ActionScript 3 is not compatible with this first virtual machine and for obvious reasons of backwards-compatibility Flash 9 player has brought on board two virtual machines. When reading a swf the player automatically selects the appropriate virtual machine in order to interpret the ActionScript code of the swf. Therefore an ActionScript 1 and 2 application will be interpreted in Flash 9 player by the virtual machine 1 (AVM1) and will not benefit from performance optimization.
Flash 9 and its two virtual machines – AVM1 and AVM2:
Only animations built in ActionScript 3 can benefit from optimisations created by the new virtual machine (AVM2).
Worth remembering:
- Previous versions of Flash player integrated only one virtual machine to interpret ActionScript 1 and 2 code.
- The virtual machine 1 (AVM1) interprets ActionScript 1 and 2 code.
- The virtual machine 2 (AVM2) only interprets ActionScript 3 code.
- Flash player integrates two virtual machines (AVM1 and AVM2).
- ActionScript 3 cannot cohabit with previous versions of ActionScript.
Mediabox Training Centre © 2000 - 2008 All rights reserved.
Adobe Authorized Training Centre. State convention under number 25 14 02167 14.
Mediabox : SARL au capital de 62.000€ - Activity number: 25 14 02167 14 - SIRET : 493 716 468 00027
MEDIABOX, 102 Avenue des Champs Elysées, 75008 PARIS - Tel. +33(0)2.31.91.96.89 - Fax. +33(0)2.72.68.56.42




