2 Replies Latest reply on Jun 1, 2006 10:18 AM by hushhurt

    movie clip button issue

      I am still in the process of learning flash, and i am trying to make a animated MC button.
      I created the MC, it has a begining animation then stops at frame 80, on frame 84, which I labeled "over" I have a small "over state" animation.
      the issue i am having is, when i test the complete movie and rollover the button, it jumpes straight to the "over" state without playing the begining animation first. I dont want to be able to see the rollover animation until the begining animation is finished.
      so i created this script:

      work_mc.onRollOver = function() {
      var cFrame:Number = _currentframe;
      var hFrame:Number = 80; //last frame of btn anim (with a stop action on frame)
      if (this.cFrame == hFrame) {
      else {
      trace("not working");

      it looks rough, but i'm still learning - hopefully i made my clear, can someone help me out?

        • 1. Re: movie clip button issue
          well i got a different way to do that i can tell you if you want,
          but looking at your code you can just do this unless you need those variables for later(cFrame and hFrame)

          work_mc.onRollOver = function() {
          if ( _currentframe == 80 ) {
          else {
          trace("not working");

          hope that helps

          • 2. Re: movie clip button issue
            hushhurt Level 1
            thank you - sorry for the delayed response.

            that did work - but what im trying to do now is make the playhead go to the frame labels insted of the frames themselves.

            how would i write;
            if(_currentfame < "frame label")
            gotoAndPlay("another frame label");

            i want to make this function more dynamic. is the frame label method only work with the "gotoAndPlay", "gotoAndStop" methods?

            can I assign a variable to a frame label, and call that varabile in a logical statement?