Flash Button Help

Out of context: Reply #4

  • Started
  • Last post
  • 4 Responses
  • patnoodle0

    Got it working, thanks anyway.
    Here's what I was trying to achieve:
    http://www.stimuli.co.uk/

    Now I'll need to streamline it, this code repeated for each and every button isn't really efficient. Any tips/suggestions?

    __________________

    // frame actions

    var btnDown;

    b1.onRollOver = function() {
         if (btnDown == undefined || false) {
              clearInterval(playI);
              playI = setInterval(playF, 30, button_mc, 1);
         } else {
              continue;
         }
    };

    b1.onRollOut = b1.onDragOut = function () {
         if (btnDown == undefined || false) {
              clearInterval(playI);
              playI = setInterval(playF, 30, button_mc, 0);
         } else {
              continue;
         }
    };

    b1.onPress = function() {
         clearInterval(playI);
         button_mc.gotoAndStop(5);
         btnDown = true;
    };

    function playF(mc, arg) {
         trace(arg);
         if (arg) {
              mc.nextFrame();
         } else {
              mc.prevFrame();
         }
    }

View thread