4 Replies Latest reply on Nov 9, 2006 6:54 AM by ricking

    GetTimer ( ) Question

    ricking
      I'm using screens in Flash MX Pro to create a small slide show. I'd like the first image to auto advance to the next screen after 5 seconds. The code below works only if the user clicks on the image (since it's activated by the MouseDown event.) How can I modify this code to auto advance after 5 seconds. I figure GetTimer() might work, but I'm not sure how to add it.

      Thanks
      RK

      on (revealChild) {

      }
      on (reveal) {

      // Transition behavior
      if (!eventObj.target._isSlide || (eventObj.target._isSlide && eventObj.target.currentSlide)) {
      mx.transitions.TransitionManager.start (eventObj.target,
      {type:mx.transitions.Blinds,
      direction:0, duration:1, easing:mx.transitions.easing.None.easeNone,
      numStrips:10, dimension:1});

      eventObj.target.__transitionManager._triggerEvent = eventObj.type;
      }
      // End Transition behavior

      }
      on (mouseDown) {

      // GoTo Next Screen behavior
      var screen = null;
      var target = this;
      while((screen == null) && (target != undefined) && (target != null))
      {
      if(target instanceof mx.screens.Screen)
      {
      screen = target;
      }
      else
      {
      target = target._parent;
      }
      }
      if(screen instanceof mx.screens.Slide)
      {
      screen.rootSlide.currentSlide.gotoNextSlide();
      }
      // End GoTo Next Screen behavior

      }