Skip to main content
December 6, 2012
Question

I need a mechanism to expose action script class reference to java script

  • December 6, 2012
  • 3 replies
  • 501 views

I need a mechanism to expose action script class reference to java script

This topic has been closed for replies.

3 replies

Legend
December 6, 2012

You might be out of luck if you are building for mobile.

Unless there is an ANE, nearest alternative would be to use StageWebView and to set url then listen for location change events.

December 6, 2012

Thanks Coffey.

I know that we can listen to java script from the location change events if we use StageWebView.

But that will not help us. Reason is we already have an application where we map the action script reference object to java script through Dom Initialization like this : htmlContent.htmlLoader.window.APIRef = this.API.

And we have defined the java script to call the action script methods directly with APIRef.

Now the question is why Dom Initialization is not supported in the Android version?

Will Adobe add this feature in the future?

Legend
December 6, 2012

Adobe, I think, are quite happy leaving the StageWebView as a highly efficient and low-level component accessing native functionality, so I wouldn't hold my breath on them extending it.

That said, I believe somebody did implement an ANE that gives much more access and, according to the docs, does allow Javascript access.

See UIWebView as per this thread; http://forums.adobe.com/message/4832821#4832821

http://darkredz.com/ios-uiwebview-and-videoplayer-native-extension-for-air-mobile/

G