2 Replies Latest reply on Oct 4, 2006 10:52 AM by 2m

    controlling flash with java script

    Level 7
      hi,
      for testing purpose i've made a very simple flash movie - containing only a
      dynamic type text field, with it's 'var' property has a value of 'myVar'.
      i've also created a html file to run that clip, which also include a button
      created with the following code:

      <input name="btn" type="button" id="btn"
      onClick="window.myFlash.SetVariable('myVar', 'abc')" value="click">

      (my flash object has both name and id set to 'myFlash').

      believe it or not - but clicking that button has no affect what so ever on
      the flash movie. same happens when the 'onClick' has a value of
      "document.myFlash.SetVariable('myVar', 'abc')" or
      "window.document.myFlash.SetVariable('myVar', 'abc')"

      i've found somewhere an example of using the ExternalInterface class, but
      when i test it the html page produces an error ('object doesn't support this
      property of method'), so i'm not sure about this type of solution either.

      any simple solution to my simple problem???

      thanks,
      eRez