Comunidad de diseño web y desarrollo en internet online

zoom y botones

Citar            
MensajeEscrito el 27 Ago 2010 03:15 am
hola tengo un movie clip en la capa2 al cual le hago un zoom y drop con el maouse, el as esta colocado en el primer frame
tambien tengo en la capa1 dos botones que cambian la imagen del movieclip, el problema que tengo es que al tocar el
boton tambien me hace el zoom por estar puesto encima del movie clip como puedo evitar esto
gracias si pueden ayudar

////---------------------------------este es el as del zoom y drop

incremento = 3;
zoomActivado = false;
ini_x=clip1._x;
ini_y=clip1._y;
function zoom(x,y,ancho,alto, aceleracion)
{clip1.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 (clip1.hitTest(_xmouse,_ymouse))
{if(zoomActivado == false)
{Alto = incremento*clip1._height;
Ancho = incremento*clip1._width;
xs = _xmouse-((_xmouse-clip1._x) * incremento);
ys = _ymouse-((_ymouse-clip1._y) * incremento);
zoomActivado=true;}
else{Alto = clip1._height/incremento;
Ancho = clip1._width/incremento;
xs = ini_x
ys = ini_y
zoomActivado=false;}
zoom(xs,ys,Ancho,Alto,3);}}

////-----------------------------------------------------------drop


clip1.onPress = arrastrar;
clip1.onRelease = soltar;
function arrastrar():Void{
this.startDrag();
this.onMouseMove = refrescarPantalla; }
function soltar():Void{
this.stopDrag();
this.onMouseMove = null; }
function refrescarPantalla():Void{
updateAfterEvent(); }

///--------------------------------------------------este es el as en uno de los botones

on (release) {
tellTarget ("/clip1") {
contador = contador + 1;
loadMovie ("img/foto" + contador + ".jpg", "circulo");
}
}

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

msie
Citar            
MensajeEscrito el 30 Ago 2010 12:41 am
segui investigando y descubri el problema.
era el onMouseDown ocasiona conflictos con los botones, lo sustitui por on press
gracias de todas formas

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.