Does anyone know how to pass data from javascript to actionscript in flex? I have tried the method involving the LocationChangeEvent listener in flex, but I have trouble getting the changed URL. I am working on a Flex Mobile project. Please help.
[Edit] I am working on a mobile project where I am trying to load a html with javascript in it. I set the size of the StageWebView to zero because I dont need the web interface, I just need to load the javascript. From there, I am trying to send data to my flex application by modifying the document.location inside the javascript like this:
document.location = "mydata";
Then, my flex application is listening to this event LocationChangeEvent where it will be triggered if there has been a change of URL happened inside the StageWebView. For some reason, I does not trigger.
[Solved] The LocationChangeEvent is actually working in my case but I did change something in the javascript.
I changed the following
document.location = "mydata";
to
window.location = "mydata";