Javascript to Flash communication doesn't work

后端 未结 2 1393
闹比i
闹比i 2021-01-26 08:05

I\'m trying to control a flash player from javascript, i did as i saw on the internet and i get an \"not supported\" error

here what i\'ve wrote:

on js:

2条回答
  •  余生分开走
    2021-01-26 08:24

    You can call the JS function SetNum1 after the DOM has loaded - the easiest way to be sure is to put the script just before tag.

    Also, you need to make sure that you have enabled Setvariable function in the AS code:

    ExternalInterface.addCalback("Setvariable", setVariable); 
    //the second parameter is the function name in the Actionscript code
    

提交回复
热议问题