RKCY
RKCY

Reputation: 4135

call from Javascript to ActionScript

Is there any way to call from javascript to actionscript, not using JSON object.

thanks, Ravi

Upvotes: 0

Views: 126

Answers (3)

Bryan Clover
Bryan Clover

Reputation: 396

You might want to consider using the Flex-Ajax Bridge.

Read: About the Flex Ajax Bridge

Enjoy!

Upvotes: 0

Pbirkoff
Pbirkoff

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

phtrivier
phtrivier

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

Related Questions