0 Replies Latest reply on Apr 22, 2008 10:05 PM by Tillthen

    geturl delima

    Tillthen Level 1
      This is AS2. I have a mc that is functioning as a button. On the mc timeline the actions frame contains the code at the bottom, and it everything works fine. Except when I try to add the getUrl statement. Here is the statement

      on (release) {
      getURL(" http://mysite.com", "_blank") ;
      }

      here is how I try to add it.
      When I'm on the main timeline, I click on the mc. then I click on the actions panel then I insert the above code. When I do, Then all the animations etc. in the button is cancelled out, but It does get the url.

      How do I get both the animations and the geturl to work together.

      below is the code contained inside the mc. please help


      // When mouse pointer over the button
      box_color.onRollOver = function() {
      box_color_play = 1;
      blickSound.start();
      };
      // When mouse pointer out of the button
      box_color.onRollOut = function() {
      box_color_play = 0;
      };
      // When mouse pointer click to button
      box_color.onRelease = function() {
      //_root.gotoAndPlay("your_label");
      // play the box_highlight_mc animation
      box_highlight.play();

      };

      clickSound = new Sound();
      clickSound.attachSound("busound01");
      box_color.onRelease = function () {
      clickSound.start();
      }
      blickSound = new Sound();
      blickSound.attachSound("s162");



      box_color.onEnterFrame = function() {
      if ((box_color._currentframe != box_color._totalframes) || (box_color._currentframe != 0)) {
      if (box_color_play == 1) {
      box_color.nextFrame();
      }
      if (box_color_play == 0) {
      box_color.prevFrame();
      }
      }
      };