Skip to main content
Inspiring
January 10, 2013
Question

pass values from javascript to flash

  • January 10, 2013
  • 1 reply
  • 568 views

I would show values from javascript to Flash.

how can i send values from javascript  to flash.

I'm tried but not showing. i don't know javascript..

please help me.

Flash as3

ExternalInterface.addCallback("sendToflash", callFromJavaScript)

       

        function callFromJavaScript():void

        {

               //alert_msg.text = sendToflash;

         }

Javascript in HTML page:

<script language="JavaScript" type="text/javascript">

function sendToflash()

{

    //send values 25,68,98  to flash

}

</script>

This topic has been closed for replies.

1 reply

Inspiring
January 10, 2013

The first argument of your addCallback function should be a string: "sendToFlash".

A good tutorial for some hickups you should be prepared for is here

It seems you must especially take a look at browser compatibility to get your code working across browsers.