ExternalInterface is designed to work with ActiveX as well as the NPRuntime API. What that means is that it works with InternetExplorer 5.0 and higher on Windows as well as with Netscape 8.0 and higher, Mozilla 1.7.5 and higher, and Firefox 1.0 and higher on Windows and Macintosh, and Safari 1.3 and higher on Macintosh. At the time of this writing, NPRuntime does not yet work with Opera. If you are building an application that must work in a browser that does not support ActiveX or NPRuntime, you can consider the Flash/JavaScript Integration Kit.
The ExternalInterface class is in the flash.external package. That means that if you want to reference the class you'll either have to use the fully qualified class name (flash.external.ExternalInterface) or you'll have to import the class before referencing it. Importing the class is generally recommended because it makes your code more succinct and readable. The following import statement imports the class so that you can simply reference the class as ExternalInterface at any point following the import statement. The following import statement is implied in every short example in the remainder of this lesson:
import flash.external.ExternalInterface;