1 Reply Latest reply on Nov 7, 2009 5:08 AM by Ned Murphy

    how to make scene play through action script

    Mishmash23

      So this is my code so far:

       

      on (press) { // Gives your movie a button functions
      getUrl("http://www.astahost.com");
      }

      on (rollOver) {
      this._alpha=100;
      gotoAndPlay("Scene 2");
      }

      on (rollOut) {
      this._alpha=25;
      }
      //sets event to mousemove or your button won't operate properly.
      onClipEvent (mouseMove) {

      //calculates distance from mouse to movie clip
      dist=Math.sqrt(Math.pow(Math.abs(_xmouse),2)+Math.pow(Math.abs(_ymouse), 2));

      // if within a certain distance, triggerdistance, then start changing the clips scale
      if (dist<=_root.menutriggerdist) {
      currscale=(1-(dist/(_root.menumultiplier*_root.menutriggerdist)))*(_root.menumaxscale-100) ;
      this._xscale = currscale;
      this._yscale = currscale;

      // if outside of triggerdistance, then make the scale equal to 100
      } else {
      this._xscale = 100;
      this._yscale = 100;
      }
      }

      when i play the movie, it plays scene 2, however, scene 2, which is in my flash document, plays automatically. how can i stop this? is there some code which only makes scene 2 play when called for and not play automatically.

       

      thanks