7 Replies Latest reply on Jun 16, 2009 1:48 PM by christoon_ca

    playhead loop question

    christoon_ca Level 1

      Hello!

       

      I'm new here, and relatively new to flash so please, bear with me

       

      In my scene, I have a button that cycles through 3 frames, then on the fourth, I need it to play a sequence. It plays the sequence fine, but loops, and I cannot for the life of me figure how to stop it after it plays. (the frame sequence is "kign")

       

      Any help is greatly appreciated. Thanks.

       

      (AS 2.0)

       

      var onOff = "koff";

       

      key.onRelease = function() {
          if (onOff == "koff") {
              onOff = "kacc";
          } else if (onOff == "kacc") {
              onOff = "kon";
          } else if (onOff == "kon") {
              onOff = "kign";
          } else if (onOff == "kign") {
              onOff = "koff";
          }
      };

       

      onEnterFrame = function () {
          if (onOff == "koff") {
              key.gotoAndStop ("koff");
          } else if (onOff == "kacc") {
              key.gotoAndStop ("kacc");
          } else if (onOff == "kon") {
              key.gotoAndStop ("kon");
          } else if (onOff == "kign") {
              key.play ("kign");
          }
      };