One of the important aspects of this extension is the ability to communicate from your Actionscript
the message, 'content-for-air' in this case.
The two important events here are:
On Android the communication channel is only completely setup after the page load is complete. I.e after NativeWebViewEvent.COMPLETE. We suggest you wait for this event before attempting to communicate between the page and the application.
To this end, we suggest implementing a function in your page that you call from AS3 after the NativeWebViewEvent.COMPLETE event has fired, which initialises your communication channel.
We have implemented some handlers for this scenario but they may affect loading of the page and we suggest you take the above approach wherever possible.
This first method is the simplest, constructing a String with the function name and parameters laid out:
Developing on this you can also construct a utility function that takes a function name and array of parameters: