0

Looking for a way for Javascript and Actionscript to share one copy of data in memory in a Flex Mobile app. Read on.

I'm building a Flex app where a portion of it is implemented in HTML/Javascript. In the browser, the SWF lives on the main page, and the HTML portion lives in an iframe, on that same page.

These two parts share about 1.5 MBytes of JSON data in the following way. The outermost page loads the data once, and defines a function that provides access to the loaded data. The Actionscript code uses ExternalInterface to call this function, and the HTML/Javascript code calls this function through its parent (which is the outer page). It's my assumption that both paths are accessing the same memory, and that I'm not actually marshalling data back and forth.

For the Flex Mobile version of this app, I'm using StageWebView to render the HTML part, which works well. But I don't know how I can share data between the two sides.

Please note, I've looked at StageWebViewBridge, and I'll give it another look. But at a quick glance it looks like pushing data around, not like actual memory sharing. Am I wrong?

4

0 回答 0