1 Reply Latest reply on Mar 12, 2009 8:47 AM by Newsgroup_User

    ExternalInterface.addCallback

      in flex---
      i am using ExternalInterface.addCallback("myFunction", callMe);
      public function callMe():void
      {
      Alert.show("callMe");

      }
      js----
      function myFunction()
      {
      alert('MY FUNCTION called');
      }
      its not working . is there any alternative for addcallback .thanks in advance
        • 1. Re: ExternalInterface.addCallback
          Level 7

          "angadala" <webforumsuser@macromedia.com> wrote in message
          news:gpa7bf$i31$1@forums.macromedia.com...
          > in flex---
          > i am using ExternalInterface.addCallback("myFunction", callMe);
          > public function callMe():void
          > {
          > Alert.show("callMe");
          >
          > }
          > js----
          > function myFunction()
          > {
          > alert('MY FUNCTION called');
          > }
          > its not working . is there any alternative for addcallback .thanks in
          > advance

          addCallback is for allowing js to call a function in your Flex app under the
          name myFunction. You're actually not calling your myFunction from js.

          You'd need something like this on the js side:

          function myFunction() {
          var flash = document.getElementByID('objectTagID');
          flash.myFunction();
          }

          I'm pretty sure all this is covered in more detail than I have time to give
          you in the docs, so go back and look and see what's already available to
          you.