mira este es el codigo del mapa (un mapa que tuve que hacer con un efecto zoom porque el as2 no me permite trabajar con google maps) bueno en fin el efecto que hice le puse este codigo:
Código ActionScript :
incremento = 2;
zoomActivado = false;
ini_x = mapa._x;
ini_y = mapa._y;
function zoom(x, y, ancho, alto, aceleracion) {
mapa.onEnterFrame = function() {
this._x += (x-this._x)/aceleracion;
this._y += (y-this._y)/aceleracion;
this._width += (ancho-this._width)/aceleracion;
this._height += (alto-this._height)/aceleracion;
if (Math.abs(x-this._x)<0.5 && Math.abs(y-this._y)<0.5 && Math.abs(ancho-this._width)<0.5 && Math.abs(alto-this._height)<0.5) {
this._x = x;
this._y = y;
this._width = ancho;
this._height = alto;
delete this.onEnterFrame;
}
};
}
onMouseDown = function() {
if (mapa.hitTest(_xmouse, _ymouse)) {
if (zoomActivado == false) {
Alto = incremento*mapa._height;
Ancho = incremento*mapa._width;
xs = _xmouse-((_xmouse-mapa._x)*incremento);
ys = _ymouse-((_ymouse-mapa._y)*incremento);
zoomActivado = true;
} else {
Alto = mapa._height/incremento;
Ancho = mapa._width/incremento;
xs = ini_x;//_xmouse-((_xmouse-mapa._x) / incremento);
ys = ini_y;//_ymouse-((_ymouse-mapa._y) / incremento);
//Desactivamos el Flag para el zoomOut
zoomActivado = false;
}
zoom(xs,ys,Ancho,Alto,3);
}
};
bueno esto me funciona perfecto pero cuando lo introduzco en otro mc ya me deja de funcionar... igual me sucede con la galeria de fotos de otro archivo,( esa galeria si inlcuye el _root, pero lo reemplazo y de inmediato se me desaprecen las fotos xml, yo no se mucho de as2, yo creo que eso tiene que ver con las acciones de mouse,
gracias por tu ayuda