#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Unhappy How can I add a new page to a flash template website


    I've been playing with this cool template and I'm trying to figure out on how to add another page and link it. Looking at the actionscript below can someone help me?

    for (var i = 1; i<=5; i++) {
    var butNum = _root.menu["b"+i];
    var butNum2 = _root.footer["b"+i];
    butNum2.index = i;
    butNum.index = i;
    butNum.bt_name.gotoAndStop(i);
    butNum2.bt_name.gotoAndStop(i);
    //butNum2 = false

    butNum.onRollOver = function() {
    if (this.index != _root.link) {
    this.gotoAndPlay("s1");
    }
    };
    butNum.onRollOut = function() {
    if (this.index != _root.link) {
    this.gotoAndPlay("s2");
    }
    };
    butNum2.onRollOver = function() {
    if (this.index != _root.link) {
    this.gotoAndPlay("s1");
    }
    };
    butNum2.onRollOut = function() {
    if (this.index != _root.link) {
    this.gotoAndPlay("s2");
    }
    };
    butNum.onRelease = function() {

    if (this.index != _root.link && _root.sel != 1) {
    _root.menu.btt._y = -3
    _root.footer.bt._y = 17;
    //butNum2 = true
    _root.menu["b"+_root.link].gotoAndPlay("s2");
    _root.footer["b"+_root.link].gotoAndPlay("s2");
    _root.link = this.index;
    _root.footer["b"+_root.link].gotoAndPlay("s1");
    _root.play();
    }
    };
    butNum2.onRelease = function() {

    if (this.index != _root.link && _root.sel != 1) {
    _root.menu.btt._y = -3
    _root.footer.bt._y = 17;
    _root.menu["b"+_root.link].gotoAndPlay("s2");
    _root.footer["b"+_root.link].gotoAndPlay("s2");

    _root.link = this.index;

    _root.menu["b"+_root.link].gotoAndPlay("s1");

    _root.play();

    }
    };
    }
    _root.link = 1;
    _root.footer.b1.gotoAndStop(10);
    _root.menu.b1.gotoAndStop(33);

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2007
    Posts
    141
    Rep Power
    18
    Not easy to see from the code but it might be something like this:

    change the following:
    Code:
    for (var i = 1; i<=5; i++) {

    to
    Code:
    for (var i = 1; i<=6; i++) {


    On the main timeline there should be movieclips called
    menu1,menu2,menu3,menu4,menu5.
    and five footers too (i.e. footer1,footer2 etc)

    select a menu, copy it(in your library) and call it menu6
    select a footer, copy it(in library) and call it footer6

    edit these as you would like, place them on main timeline.

    Comments on this post

    • Tann San agrees : Nice :)
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0
    Thanks for your reply. I've already figured it out, but i appreciate your response. It's exactly how you wrote it. It was confusing for me at first but now I understand how it works.

    Thanks drawde.

IMN logo majestic logo threadwatch logo seochat tools logo