openfl.external

..
ExternalInterface

The ExternalInterface class is an application programming interface that enables straightforward communication between ActionScript and the SWF container — for example, an HTML page with JavaScript or a desktop application that uses Flash Player to display a SWF file.