3 Replies Latest reply on Jul 31, 2007 10:10 AM by kglad

    ExternalInterface problem

    Bob_Robertson Level 1
      I have a movie, with interactivity and plenty of Actionscript 2.0 . Within this movie, I have defined a function called overrideFault.
      It is shown below. I have also exposed this function to JavaScript via ExternalInterface.addCallback(), also shown below. My problem is that when I try to call the function with a button's onclick handler in JavaScript, it doesn't seem to think that I have exposed the function. I am able to use JavaScript to access the movie's DOM 'id' property, so I know that that part is right.

      Has anyone else encountered this? Or perhaps would like to offer advice?

      Many Thanks,
      Bob Robertson
        • 1. Re: ExternalInterface problem
          kglad Adobe Community Professional & MVP
          that looks like it has several problems. not the least of which is overrideFault is not the same as faultOverride.

          check the flash help files under externalinterface/addcallback. copy and paste their sample code. once you have that working starting making changes to make their code satisfy your needs.
          • 2. ExternalInterface problem
            Bob_Robertson Level 1
            Ironically, I just noticed the problems that I posted. They've been fixed, and it now works properly in that respect. Thanks for catching that, though. I'll have to watch naming conventions in the future.

            What other problems did you notice? I try to improve when I have the opportunity.

            Bob Robertson

            EDIT: Sorry, should've been more specific. I noticed the problems with addCallback, and fixed them. I also noticed the mis-called function, and fixed that as well.
            • 3. Re: ExternalInterface problem
              kglad Adobe Community Professional & MVP
              if it's working, change nothing.