0 Replies Latest reply on Nov 28, 2007 10:59 AM by ndippy

    actionscript for button

    ndippy
      hi everyone,
      my question is, how to write a actionscript code for a button when the button is clicked it should move to the nextframe.
      // About and smile1 button scripts
      stop();
      _root.smile1.onPress = function() {
      if (mouse_over_smile1) {
      _root.smile1.gotoAndStop(5);
      } else {
      _root.smile1.prevFrame();
      }
      };

      // animation for the smile2 button

      _root.smile2.onRelease = function() {
      if (mouse_press_smile2) {
      _root.smile2.gotoAndStop(6);
      } else {
      _root.smile2.stop();
      }
      };
      // animation for the smile3 button

      _root.smile3.onEnterFrame = function() {
      if (mouse_over_smile3) {
      _root.smile3.gotoAndStop(7);
      } else {
      _root.smile3.prevFrame();
      }
      };

      i have given 3 functions as onEnterFrame,onPress,onRelease. i tried all these but didnt get the result.
      smile1,smile2,smile3 are button instances which are declared on the monie clip.
      my main thing is i hav a button, when i click on that button it should go the next frame which i have declared in "gotoAndPlay(6)" method. can any one write the code for me.
      i need it urgently.
      Thank You.