1 Reply Latest reply on Nov 28, 2007 4:03 AM by finox006


    jlackyashdya Level 1

      i just want to pass a variable from java script to actionscript.

      so i have used SetVariable for it. And its working fine. Means its passing a variable from java script and displaying its value into a textfield which is in flash.

      but now...depending on that value i want to write if else statement.

      but its not going into the if else statement.

      actionscript code:

      var a;
      if(a == 1234)
      a = "success";
      a = "no luck";

      Javascript code:

      <script language="JavaScript">

      function setVariable() {
      theValue = prompt ("Please entr a phrase:", "1234");
      if (theValue!=null) {
      document.setvariable_usingVariable.SetVariable('a' , theValue);
      <a href="javascript:setVariable()" title="Pass variable to flash from JS">Ok, JS to Flash Now!</a>

      its very very important to me...
      please help me.....

      waiting for ur help.....
        • 1. SetVariable
          this code is working fine.
          The html and swf file insert in a server.
          Frame script is working one time.
          Insert a button in UR project and change frame script to button

          on (press) {
          var a;
          if (a == 1234) {
          ab = "success";
          } else {
          ab = "no luck";