0 Replies Latest reply on Feb 23, 2010 9:44 PM by s.ruparelia

    Javascript notifications to Flex on Multiple objects



      I know that with ExternalInterface, we can register ActionScript functions that will be callable from JavaScript, But i want to register actionscript function for of one class which has multiple instance created in the Application. So how it will recognize which object action script  function will called from java script.

      For example :

      1) Java script : Has function javaScripAlert() which call Action script function  showAlert();

      Ie    testSwf.alert(value);

      function javaScripAlert (value) {

      2) Class ABC  has call back function  showAlert (value); It register callback function “showAlert” in class ..

      Ie . ExternalInterface. addCallback(“alert”, showAlert);

      3) TestApplication  : in this I have created multiple objects of Calss ABC


      <ns1:ABC  id=”abc1” />

      <ns1:ABC  id=”abc2” />

      <ns1:ABC  id=”abc3” />

      I have created multiple object of type ABC in the TestApplication  . so when I call javaScript function  javaScripAlert() from HTML  it  only calls function showAlert (value)  of  object  “abc3” and not for the other objects abc1 ,abc2.

      So is any way that function of other object also called at that time .



      Thanks & Regards,
      Sanjay Ruparelia