Category Archives: ExternalInterface

Returning values from JavaScript in your Flex applications using the ExternalInterface API

In a previous example, “Calling JavaScript functions from your Flex applications using the ExternalInterface API”, we saw how we could call JavaScript functions from our Flex application.

The following example shows us how we can return a value from a JavaScript function call and use the data in our Flex application.

Full code after the jump.

Continue reading

Calling ActionScript functions from your HTML templates using the ExternalInterface API

In a previous example, “Calling JavaScript functions from your Flex applications using the ExternalInterface API”, we saw how you could call JavaScript methods from our Flex applications using the static ExternalInterface.call() method.

The following example shows you how you can call ActionScript methods in our Flex applications from JavaScript using the static ExternalInterface.addCallback() method and a bit of JavaScript.

Full code after the jump.

Continue reading