0 Replies Latest reply on Mar 4, 2007 11:02 AM by Coupee36

    Action Script to add MC as sub-pages ??

    Coupee36
      Alright please help.. I have tried everything, been fooling around with this in the past 5 hours and its not going anywhere :( . Here is what i have. :

      I have 6 menu buttons... Button 4 is what i am concentrating on.

      at the moment here is the current action script of button 4 :

      --CODE---

      //-----this first few lines just controls the button animation --
      on (rollOver) {
      if (_root.link<>4) {
      gotoAndPlay("s1");
      }
      }
      on (releaseOutside, rollOut) {
      if (_root.link<>4) {
      gotoAndPlay("s2");
      }
      }
      //-----end of button animation-----
      on (release) {
      _root.scroller.scroller.gotoAndStop(3); // I understand this calls for fram 3 in an mc within an mc.
      if (_root.anim==true) { // not really sure where this means
      if (_root.link<>4) { // if value of _root.link <> 4 then activate the following code
      _parent["but"+_root.link].gotoAndPlay("s2"); // I kind of understand this part, i know it has to do with playing the button animation, but i am stuck where it says "but" + _root.link .
      _root.link = 4; // value of root.link
      _root.all.play();
      }
      }
      }


      --

      ok so basically, from what i can figure out what this action script does is : somehow it calls out a mc called "all action page" and the contents inside this mc are two layers. one layer is just a stop frame, and the other layer has multiple frames, each frame in the layer are each different mc's .. the _root.value is the value of each frame, for example if i change the value to 2 or 3 it will load frame 2 or 3 within the "all action page" mc..

      now my question, is is there any way i can replicate this script for the use of button 4 ?? i know i can just keep adding new frams and mc's to the current "all action page" and just keep changing the value that corresponds to the frame number, but i would like to make it more neater and structured incase if i need to change anything. any suggestions ??

      -Steph'