Código:
import mx.transitions.Tween; import mx.transitions.easing.*; var oriX:Number = Stage.width/2; var oriY:Number = Stage.height/2; var mcHolder:MovieClip = this.createEmptyMovieClip('mcHolder', this.getNextHighestDepth()); mcHolder._x = oriX; mcHolder._y = oriY; var mcMapa:MovieClip = mcHolder.attachMovie('mcMapa', 'mcMapa', mcHolder.getNextHighestDepth()); mcMapa._x = mcMapa._width/-2; mcMapa._y = mcMapa._height/-2; mcMapa.useHandCursor = false; mcMapa.onRelease = function() { var speed:Number = .2; var initX:Number = this._x; var endX:Number = -oriX-this._xmouse+Stage.width/2; if (endX>-oriX) { endX = -oriX; } if (endX<Stage.width-this._width-oriX) { endX = Stage.width-this._width-oriX; } var twX:Tween = new Tween(this, '_x', Back.easeOut, initX, endX, speed, true); var initY:Number = this._y; var endY:Number = -oriY-this._ymouse+Stage.height/2; if (endY>-oriY) { endY = -oriY; } if (endY<Stage.height-this._height-oriY) { endY = Stage.height-this._height-oriY; } var twY:Tween = new Tween(this, '_y', Back.easeOut, initY, endY, speed, true); }; var speed:Number = .5; var ratio:Number = 16; var maxZoom:Number = 500; var bolZoom:Boolean = false; var lst:Object = new Object(); lst.onMouseWheel = function(delta) { var initS:Number = mcHolder._xscale; var endS:Number = mcHolder._xscale+(delta*ratio); if (delta<0) { if (mcHolder._width>Stage.width) { bolZoom = true; } else { bolZoom = false; } } else if (delta>0) { mcMapa.enabled = true; if (mcHolder._xscale<maxZoom) { bolZoom = true; } else { bolZoom = false; } } if (bolZoom) { var twSX:Tween = new Tween(mcHolder, '_xscale', Back.easeOut, initS, endS, speed, true); var twSY:Tween = new Tween(mcHolder, '_yscale', Back.easeOut, initS, endS, speed, true); twSY.onMotionFinished = function() { if (mcHolder._width<Stage.width) { mcMapa.enabled = false; var twX:Tween = new Tween(mcMapa, '_x', Back.easeOut, mcMapa._x, mcMapa._width/-2, speed, true); var twY:Tween = new Tween(mcMapa, '_y', Back.easeOut, mcMapa._y, mcMapa._height/-2, speed, true); } }; } }; Mouse.addListener(lst);
esto es lo que quiero modificar
ww.d3digital.com.mx/mapa.fla
POR FAVOR!!!