La accion se encuentra en el fotograma 1 de la pelicula principal.
Código ActionScript :
mapa.onPress = function() {
if(mano){
this.startDrag();
}else{
this.inix = this.foto._xmouse;
this.iniy = this.foto._ymouse;
this.onEnterFrame = function() {
cuad.clear();
cuad.lineStyle(.4, 0xffffff,50);
cuad.dibujaRectangulo(this.foto._xmouse, this.foto._ymouse,
this.inix, this.iniy);
};
};
};
mapa.onRelease = mapa.onReleaseOutside= function() {
if(mano){
this.stopDrag();
}else{
this.inix = Math.min(this.inix,this.foto._xmouse);
this.iniy = Math.min(this.iniy,this.foto._ymouse);
delete this.onEnterFrame;
if (cuad._width*scale/100>10 || cuad._height*scale/100>10){
this.foto.mover(ecuacion, vel, 0, {
_x:-this.inix-(cuad._width/2),
_y:-this.iniy-(cuad._height/2)
});
scale=escalar(finalx,finaly,cuad._width,cuad._height);
this.mover(ecuacion, vel, 0, {
_xscale:scale , _yscale:scale,
_x:finalx/2, _y:finaly/2
},
function(){cuad.clear();});
}else{
cuad.clear();
scale *= sententido;
this.foto.mover(ecuacion, vel, 0, {
_x:-this.foto._xmouse,
_y:-this.foto._ymouse
});
this.mover(ecuacion, vel, 0, {
//aplicamos scale
_xscale:scale , _yscale:scale,
_x:this._parent._xmouse, _y:this._parent._ymouse
});
}
}
};