Does anyone know if I can pass data from flash (action script) to java script? If yes... how?
(I need to send an ajax request with a text typed inside a textbox from actionscript).
Does anyone know if I can pass data from flash (action script) to java script? If yes... how?
(I need to send an ajax request with a text typed inside a textbox from actionscript).
You can use ExternalInterface to interact w/ JavaScript
import flash.external.ExternalInterface;
button_1.addEventListener(MouseEvent.CLICK, function(){
ExternalInterface.call("myFunc", "param");
});
for some reason i run into issues if i declare JavaScript tag type='text/javascript'
. so i recommend using:
<script language='javascript'>
function myFunc(myparam){
//your code
}
</script>