3 Replies Latest reply on May 24, 2006 11:49 PM by kidconcept

    tricky for me, easy for you

    kidconcept
      hello,

      i'm having problems with my movie clip behaviors on some button rollovers. i want my movie clips to play frames 1 to 13 on rollover, pause at frame 13 until rolloff, and at rolloff run frames 14-27. if the user rollsoff before frame 13, i would like the movie to finish it's cycle (to frame 27) rather than just stopping.

      i set up the action scripting thusly: two vars, "start" and "done" are set to true on rollover and rolloff respectively. the movieclip will only play if one of the two conditions are met. it is at frame 1 AND start is true, or it is at frame 14 AND done is true.

      the problem is when you rollover the button, and then rolloff and rollbackover while it is still playing. it's a little tricky to reproduce but when you do it, the movie clip will no longer pause at frame 13. : (

      i tried setting done and start to false at various steps in the movie clip, but that didn't solve my problem.

      my action script looks like this.

      on the button
      on (rollOver) {
      redflower.start = true;
      }

      on (rollOut) {
      redflower.done = true;
      }


      on the redflower movie clip
      onClipEvent(EnterFrame)
      {
      with(this) // everything refers to this clip now
      {
      if (_currentframe == 1)
      {
      if(start) // start flag set?
      play();
      }
      else if(_currentframe == 14)
      {
      if(done) // time to close?
      play();
      }
      }
      }


      in the redflower mc
      frame 1 (blank frame running from 1-13)
      stop();
      this.done = false;

      frame 14 (blank frame runnign from 14-27)
      stop();
      this.start = false;

      frame 28
      this.start = false;


      i'd love some help on this, i'm trying to get my site real clean.
      here is a link to the site, and a link to my .fla
      kidconcept.com
      main.fla