0 Replies Latest reply on May 6, 2007 7:12 AM by nikising

    How to target main timeline from within 3 mcs in a slidemenu?

    nikising
      Hello there,

      I am trying to modify a slidemenu script but don't really know how to accomplish it. I have a series of buttons within three mcs. (this is necessary for the sliding script to work). In the original script, the button name is targeted to a label with the same name in a new scene.

      The code on the button is:

      on (release) {
      gotoAndStop("/:" add eval("..:text"));
      // THIS goes to the FRAME with the name of the button you just clicked on.
      }

      The MC code is:

      // --------------------------------------------
      // tmi=total menu items
      // dup=new movie duplicates
      // butn=original movie button
      // --------------------------------------------
      // FIX original Button:
      butn:text = /:Menu0;
      while (Number(n)<Number((/:tmi*2)-1)) {
      n = Number(n)+1;
      dup = "butn" add n;
      duplicateMovieClip("butn", dup, n);
      setProperty(dup, _x, Number(getProperty(dup, _x))+Number(n*getProperty(dup, _width)));
      setProperty(dup add "/b", _x, getProperty (dup add "/b", _x) + (1));
      set(dup add ":n", n);
      // assign button name from variables
      if (Number(n)<Number(..:tmi)) {
      set(dup add ":text", eval("/:Menu" add n));
      } else {
      set(dup add ":text", eval("/:Menu" add (n-/:tmi)));
      }
      }


      The problem I am having is that I don't want to go to a new scene ( because I am only loading photos) but would like to target a label on the main menu. I have tried many ways including (my label is named "one"):

      on (release) {
      _root.gotoAndStop("Main" "one");
      }

      on (release) {
      _root.gotoAndStop("one");
      }

      on (release) {
      gotoAndStop("Main" "one");
      }
      on (release) {
      _level0.gotoAndStop("one");
      }

      But none of these work. There must be a way to do this no? Please someone enlighten me! I need all the help I can get.

      Thanks very much for your support,

      Niki