2 Replies Latest reply on Jan 5, 2009 5:03 AM by Ned Murphy

    HELP!!!!!!!!!!!

    bmesta
      I just downloaded a template from the internet and Im trying to modify the script so whne the user clicks on a button it opens a separate link.

      CAN SOMEONE PLEASE TELL ME WHERE I'M SUPPOSE TO ADD THE CODE & WHAT iS THE CODE I'M SuPPOsE TO ADD?

      The file consists of the following.....

      I have a scene called construction which consists of different frames. This is the code that appears in each frame.

      FRAME 1 :
      flashmo_button._visible = false;
      var button_label:Array = new Array("About Us", "Benefits", "FAQ");
      var total_page:Number = button_label.length;

      for( i = 0; i < total_page; i++ ){
      flashmo_button.duplicateMovieClip("flashmo_button"+i,i);
      this["flashmo_button" + i]._x=flashmo_button._x +flashmo_button._width+1) * i;
      this["flashmo_button" + i]._y = flashmo_button._y;
      this["flashmo_button" + i].label_txt = button_label ;
      this["flashmo_button" + i].no = i;
      }
      function change_page(no){
      for( i = 0; i < total_page; i++ ){
      this["flashmo_button" + i].button_mc._visible = true;
      this["flashmo_button" + i].graphic_bg1._visible = true;
      this["flashmo_button" + i].graphic_bg2._visible = false;
      }
      this["flashmo_button" + no].button_mc._visible = false;
      this["flashmo_button" + no].graphic_bg1._visible = false;
      this["flashmo_button" + no].graphic_bg2._visible = true;
      _root.page = no + 1;
      _root.play();
      }
      change_page(0);

      FRAME 31:
      flashmo_contents.setMask(content_mask);
      old_page = page;

      FRAME 32:stop();
      FRAME 33: if( page == old_page ) prevFrame();
      FRAME 34: gotoAndPlay("start"); content_mask.play();

      Then i have a section symbols definition which has three different type of symbols: flashmo button, flashmo button g2, flashmo button g1.

      flashmo button has the following
      Frame1: stop();
      Frame11: stop();
      invisible button, <button_mc>:
      on (rollOver) { gotoAndPlay("start");}
      on (rollOut, dragOut) { gotoAndPlay("stop");}
      on (release, releaseOutside) {
      _parent.change_page(no);
      _parent.play();
      }

      flashmo button g2 has this inside of it.
      Frame 1: label_txt = _parent.label_txt;

      flashmo button g1 has this inside of it
      Frame 1:: label_txt = _parent.label_txt;

      I'm a newbie so i don't know where im suppose to add the code. I did some research on the internet and saw other ppl used the command getURL("blah"). I dont know how to apply it for my scenario.

      ALL HELp IS gREATLy APPRECIATE IT
        • 1. Re: HELP!!!!!!!!!!!
          johnypeter
          Better try to post your fla files here...
          • 2. HELP!!!!!!!!!!!
            Ned Murphy Adobe Community Professional & MVP
            You should post your code using the Attach Code feature. It is difficult to follow so much code when you do not do that... it loses any indentation it might have, as well as any index value assigned as [ i ] (which caused your posting to become [ i ]talics.

            Using getURL would be the correct route if you're linking to a web page outside of the Flash file. If you do repost your code, explain how the button(s) you're adding will be implemented wrt the other buttons the template provides code for... will they be in that same grouping or separate?