3 Replies Latest reply on Sep 25, 2006 9:18 AM by Nickels55

    Flash 8 and Javascript

    bigj9901
      Can anyone tell me why this doesn't work and how to make it work?

      I have an flv (flash 8) that's being loaded externally into a swf called player. I have cue points that are created at run time.
      The first javascript function executes but all of the other ones seem to fail. I'm positive flash is recognizing the cue points because i can here the browser click when it tries to execute the other javascript functions. But nothing happens.

      This is the code I'm using and yes javascript functions are present in the html.

      var listenerObject:Object = new Object();
      listenerObject.cuePoint = function(eventObject:Object):Void {
      if (eventObject.info.name = "graphic_on") {
      getURL("javascript:MM_swapImage('serv1','','images/servicemenu/servicemenu3on.gif',1)");
      }
      else if (eventObject.info.name = "db_on") {
      getURL("javascript:MM_swapImgRestore(); MM_swapImage('serv2','','images/servicemenu/servicemenu5on.gif',1)");
      }
      else if (eventObject.info.name = "print_on") {
      getURL("javascript:MM_swapImgRestore(); MM_swapImage('serv3','','images/servicemenu/servicemenu7on.gif',1)");
      }
      else if (eventObject.info.name = "mail_on") {
      getURL("javascript:MM_swapImgRestore(); MM_swapImage('serv4','','images/servicemenu/servicemenu9on.gif',1)");
      }
      }
      myflv.addEventListener("cuePoint", listenerObject);


      Thanks,
      Jeremy