Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

pass values from javascript to flash

Engaged ,
Jan 10, 2013 Jan 10, 2013

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>

TOPICS
ActionScript
548
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 10, 2013 Jan 10, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines