3 Replies Latest reply on Dec 14, 2006 8:59 AM by kglad

    Have rollovers but need onClick - Please help

    linzi007
      Have the following code on a MC which contains a number of buttons in a rollover menu

      onClipEvent (enterFrame) {
      // Make sure you fill in these variables

      var firstStop = 15 // You should put a stop action on your MClip at the
      // frame where you would like the animation to pause.



      var frameNum = this._currentframe;
      _root.qw = frameNum;
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
      _root.qwerty = "True";


      setProperty("_parent.mc_bedrooms", _visible, false);
      setProperty("_parent.mc_media", _visible, "0");
      setProperty("_parent.mc_homeoffices", _visible, "0");
      setProperty("_parent.mc_open", _visible, "0");
      setProperty("_parent.mc_bespoke", _visible, "0");

      if (frameNum>=1 && frameNum<=9) {
      this.Play();
      }
      if (frameNum>=11 && frameNum<=20) {
      this.gotoAndPlay(10);
      } else if (frameNum>=21) {
      var rightFrame = this._totalframes-frameNum;
      this.gotoAndPlay(rightFrame);
      }
      } else {
      _root.qwerty = "false";
      setProperty("_parent.mc_bedrooms", _visible, "1");
      setProperty("_parent.mc_media", _visible, "1");
      setProperty("_parent.mc_homeoffices", _visible, "1");
      setProperty("_parent.mc_open", _visible, "1");
      setProperty("_parent.mc_bespoke", _visible, "1");


      if (frameNum>=10 && frameNum<=15) {
      this.Play();
      }

      }
      }


      I would now like this menu to work onCLick rather than rollover, have tried changing the event to onMouseDown but this didn't work as the menu still needs to close when you mouseOut

      please see http://www.kothia.co.uk/ for working example of menu