Created
April 11, 2014 17:55
-
-
Save cpreston/10487991 to your computer and use it in GitHub Desktop.
Call action script from javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(ExternalInterface.available) | |
{ | |
ExternalInterface.addCallback("callFlashFromJS", addBooks); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="myForm"> | |
<input name="inputTextField" id="inputTextField" type="text" value="0"> | |
<form name="form"> | |
<input type="button" onclick="callFlash()" value="Call Flash" /> | |
</form> | |
<script type="text/javascript"> | |
function callFlash() | |
{ | |
var inputTextFieldValue = document.getElementById('inputTextField').value; | |
//alert(getSWF('${application}') + inputTextFieldValue); | |
getSWF('${application}').callFlashFromJS(inputTextFieldValue); | |
} | |
</script> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment