0 Replies Latest reply on Apr 29, 2007 9:17 AM by zorrrrrrrrrrrrrrrro

    Action Script Master Required

    zorrrrrrrrrrrrrrrro Level 1
      Can someone please help with this action script below.

      I have a flash banner similar to the one on this website www.grisoft.com except my script is setup to rollover the button and automatically go to the url. I would like to roll over the buttton, change the photo and then click to get url. I have attched the action script below, also where do I put the url information?

      If anyone can help, it would be greatly appreciated!

      THE ACTION SCRIPT IS BELOW

      function setSub(state)
      {
      for (i = 0; i <= _global.menuCnt; i++)
      {
      _root["sub" + state]["btn" + i].ii = i;
      _root["sub" + state]["btn" + i].onRelease = function ()
      {
      getURL(_root["subURL" + state][this.ii - 1], "_self");
      };
      } // end of for
      } // End of the function
      function control(num)
      {
      if (num != 1)
      {
      _root.subBar.gotoAndPlay(2);
      }
      else
      {
      _root.subBar.gotoAndStop(1);
      } // end if
      _root.createEmptyMovieClip("enter", 1);
      _root.enter.onEnterFrame = function ()
      {
      _root.select._x = _root.select._x + speed * (_root["mainBtn" + num]._x - _root.select._x);
      _root.photo._x = _root.photo._x + speed * ((num - 1) * -800 - _root.photo._x);
      _root.copyphoto._x = _root.copyphoto._x + speed * ((num - 1) * 800 - _root.copyphoto._x);
      TX = (num - 1) * -800;
      if (Math.round(_root.photo._x) <= TX && Math.round(_root.photo._x) >= TX)
      {
      subView(num);
      delete _root.enter["onEnterFrame"];
      } // end if
      };
      } // End of the function
      function ini()
      {
      var i = 1;
      while (i <= _global.menuCnt)
      {
      _root["sub" + i]._visible = false;
      i++;
      } // end while
      } // End of the function
      function subView(num)
      {
      _root["sub" + (num - 1)]._visible = true;
      } // End of the function
      function imgSort()
      {
      num = 0;
      var i = 1;
      while (i <= _global.menuCnt)
      {
      _root.photo["photo" + i]._x = num * _root.photo["photo" + i]._width;
      _root.copyphoto["photo" + i]._x = num * -1 * _root.copyphoto["photo" + i]._width;
      num++;
      i++;
      } // end while
      } // End of the function
      mainURL = new Array("", "", "", "", "");
      subURL1 = new Array("88.html", "88.html", "88.html", "88.html");
      subURL2 = new Array("88.html", "88.html", "88.html", "88.html");
      subURL3 = new Array("88.html", "88.html", "88.html", "88.html");
      subURL4 = new Array("88.html", "88.html", "88.html", "88.html");
      _global.menuCnt = 5;
      for (i = 1; i <= _global.menuCnt; i++)
      {
      _root["mainBtn" + i].ii = i;
      _root["mainBtn" + i].onRelease = function ()
      {
      control(this.ii);
      ini();
      setSub(this.ii);
      getURL(mainURL[this.ii - 1], "_self");
      };
      } // end of for
      _root.onLoad = function ()
      {
      ini();
      imgSort();
      speed = 0.300000;
      setSub(1);
      setSub(2);
      setSub(3);
      setSub(4);
      };