This example uses SWFObject's dynamic publishing. See this example's related article.
Sending to ActionScript:
Received from ActionScript:
This example is © Philip Hutchison. Licensed under an MIT-style license.
More examples can be found at https://pipwerks.github.io/learnswfobject