Answer Posted / Shiv Shkti Singh
To call JavaScript functions from ActionScript in Flex, you can use the ExternalInterface class. First, ensure your JavaScript file is accessible and has the necessary cross-domain policy files (crossdomain.xml). Then, in ActionScript, use the following syntax:
```actionscript
ExternalInterface.call('myFunction', 'parameter1');
```
In JavaScript, define a function like this:
```javascript
function myFunction(param) {
// Your JavaScript code here
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers