Reputation: 4135
Is there any way to call from javascript to actionscript, not using JSON object.
thanks, Ravi
Upvotes: 0
Views: 126
Reputation: 396
You might want to consider using the Flex-Ajax Bridge.
Read: About the Flex Ajax Bridge
Enjoy!
Upvotes: 0
Reputation: 4702
You can call a function inside your Flash with the following Javascript:
<script>
function callToFlash(param)
{
var fl = document.getElementById('idOfFlashObject');
if(fl != null)
{
fl.functionInFlash(param);
}
}
</script>
More about this can be found at the Adobe Knowledge Base: http://kb2.adobe.com/cps/156/tn_15683.html
Upvotes: 2
Reputation: 13361
ExternalInterface could be your friend :
http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html
or
http://livedocs.adobe.com/flex/3/html/help.html?content=passingarguments_5.html
(I'm not sure the second link will work, though ... )
Upvotes: 4