0 Replies Latest reply on Oct 18, 2009 2:08 PM by MeadowRyan

    zooming function for movie clip


      Hello all,


      I've used this script:


      onClipEvent (mouseDown) {
          if (i>0) {
          zoom = true;
          dir == 1 ? (dir=-1) : (dir=1);
          if (dir == 1) {
              pt = {x:_root._xmouse, y:_root._ymouse};
      onClipEvent (enterFrame) {
          if (!zoom) {
          _root._xscale += dir*i*30/20;
          _root._yscale += dir*i*25/20;
          var pt2 = {x:pt.x, y:pt.y};
          _root._x -= (pt2.x-pt.x);
          _root._y -= (pt2.y-pt.y);
          if (i == 12) {
              zoom = false;
              i = 0;

          var i = 0;  



      which will zoom in on a movie clip based on your mouse position, but I was trying to alter it so that it would only zoom in when clicked on certain areas, i.e. I've created a US map with many locations and rather than having it zoom based on mouse position change this script so that it will zoom based on individual locations I already have set. I thought I could just apply it to each location but it doesn't zoom at all...only when set on the first from of the main mc(the entire map) I've attached my current .fla if anyone could provide any assistance...thanks