1 Reply Latest reply on Dec 19, 2006 8:28 PM by Metro Media

    Only works once

    Will Y.
      Hi,
      I've kind of juried rigged some script and it works, but only the first time. I'm using a component called Slideshowpro that builds photo galleries. I'm trying to customize the navigation by having a caption appear on rollover of the image. I've built a movie clip that holds the caption text. when the clip plays a box fades in or out, revealing or hiding the caption.
      Here's the script:
      var sspListener = new Object();
      sspListener.imageData = function(eventObject):Void {
      caption_mc.caption_txt.text = eventObject.data.caption;
      };
      sspListener.imageRoll = function(eventObject):Void {
      if (eventObject.data == "over") {
      caption_mc.gotoAndPlay(2);
      }
      if (eventObject.data == "out") {
      caption_mc.gotoAndPlay(11);
      }
      };
      _ssp.addEventListener("imageData", sspListener);
      _ssp.addEventListener("imageRoll", sspListener);

      It works perfectly. EXCEPT it only works once. After that nothing. When I go to the next image or come back to an image, it works fine, but only once.

      any ideas where I've messed up?
      thanks
      will
        • 1. Re: Only works once
          Metro Media Level 1
          not sure exactly why it would only work once, but I personally dont like using a listener for simple button actions.
          If it were me, i would just use standard button actions and make the caption fade in and out with an alpha tween.