[FLASH 8] zoom a un mc específicos del ratón y _X _Y

  • rtank
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 26, 2008
  • Mensajes: 6
  • Status: Offline

Nota Marzo 26th, 2008, 11:46 am

¡Hola a todos,

Necesito ayuda con este problema:

Tengo un MC que quiero ampliar.
El problema es que quiero que el zoom a suceder de acuerdo a el lugar exacto hecho clic en el puntero del ratón.

Id como para que se ajuste con la exhsisting siguiente código:
Código: [ Select ]
function zoom (mc, start, end, time)
{
    type = mx.transitions.easing.Strong.easeOut;
    zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
    zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
} // End of the function
  1. function zoom (mc, start, end, time)
  2. {
  3.     type = mx.transitions.easing.Strong.easeOut;
  4.     zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
  5.     zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
  6. } // End of the function

¿Puede usted ayudarme?

Muchas gracias de antemano
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Marzo 26th, 2008, 11:46 am

  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Marzo 26th, 2008, 8:15 pm

¿Qué significa suceder en el lugar un clic del ratón se produce? su zoom es realmente justo que el mc más grande. ¿Quieres que la mc a centro donde hace clic en el ratón?
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • rtank
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 26, 2008
  • Mensajes: 6
  • Status: Offline

Nota Marzo 27th, 2008, 12:49 am

graphixboy escribió:
¿Quieres que la mc a centro donde hace clic en el ratón?


Exactamente! gif "alt =": múltiples: "title =" #Milti "/>

primer clic = Zoom (a decir, el 50% de mejora) dónde se hace clic en el ratón;

segundo click = Alejar el zoom (a restablecer el tamaño original mc);

Algo así como esto

Pero parece como Im alcanzando las estrellas gif "alt =": grito: "title =" Crying o muy triste "/>
  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Marzo 28th, 2008, 10:19 am

ok puede modificar su función como ésta. (Asumiendo que el punto de registro se encuentra en el centro de tu movieclip

Código: [ Select ]
function zoom (mc, start, end, time)
{
type = mx.transitions.easing.Strong.easeOut;
zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
movex = new mx.transitions.Tween(mc, "_x", type, mc._x, _root._xmouse, time, true);
movey = new mx.transitions.Tween(mc, "_y", type, mc._y, _root._ymouse, time, true);
} // End of the function
  1. function zoom (mc, start, end, time)
  2. {
  3. type = mx.transitions.easing.Strong.easeOut;
  4. zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
  5. zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
  6. movex = new mx.transitions.Tween(mc, "_x", type, mc._x, _root._xmouse, time, true);
  7. movey = new mx.transitions.Tween(mc, "_y", type, mc._y, _root._ymouse, time, true);
  8. } // End of the function
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • rtank
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 26, 2008
  • Mensajes: 6
  • Status: Offline

Nota Marzo 30th, 2008, 4:32 pm

Gracias de nuevo para su publicación, PAL...

Me tomó los 2 últimos días para probar el código que amablemente me envió a través de esta placa, y aunque la. Swf parece como el zoom en consecuencia a un cambio de posición del ratón...se siente como no su zoom en el punto exacto donde está el ratón...algo como una "marcha atrás" zoom... gif "alt =":(" title =" Sad "/>

He publicado los resultados para ti para comprobar y (esperemos) para que usted me diera un poco más de...esperanza. :cry:

Gracias por ahora y si quieres dar, no hay problema...Malos samely ser agradecidos. gif "alt =": wink: "title =" Wink "/>
  • munni
  • Born
  • Born
  • No Avatar
  • Registrado: Mar 28, 2008
  • Mensajes: 3
  • Status: Offline

Nota Marzo 30th, 2008, 11:14 pm

Hola señor,

Quiero dinámico galería de fotos con flash utilizando XML.


Gracias, s
  • derekcfoley1
  • Born
  • Born
  • No Avatar
  • Registrado: Jun 19, 2009
  • Mensajes: 2
  • Status: Offline

Nota Junio 19th, 2009, 8:52 am

Código: [ Select ]
function zoom (mc, start, end, time)
{
type = mx.transitions.easing.Strong.easeOut;
zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
movex = new mx.transitions.Tween(mc, "_x", type, mc._x, _root._xmouse, time, true);
movey = new mx.transitions.Tween(mc, "_y", type, mc._y, _root._ymouse, time, true);
} // End of the function
  1. function zoom (mc, start, end, time)
  2. {
  3. type = mx.transitions.easing.Strong.easeOut;
  4. zoomx = new mx.transitions.Tween(mc, "_xscale", type, start, end, time, true);
  5. zoomy = new mx.transitions.Tween(mc, "_yscale", type, start, end, time, true);
  6. movex = new mx.transitions.Tween(mc, "_x", type, mc._x, _root._xmouse, time, true);
  7. movey = new mx.transitions.Tween(mc, "_y", type, mc._y, _root._ymouse, time, true);
  8. } // End of the function
[/ quote]

Gran graphixboy poco de código - muy útil...Sólo tengo una pregunta, ¿cómo se puede "cancelar" la transición "a mediados de flujo", como se va (por ejemplo, qué youd que hacer para cancelarla si apretar un botón o quieren arrastrar, mientras que su todavía se mueve)
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • Avatar de Usuario
  • Registrado: Jul 25, 2005
  • Mensajes: 2735
  • Loc: Nashville, TN
  • Status: Offline

Nota Junio 19th, 2009, 9:29 am

Tween.Stop () - a fin de zoomX.Stop () etc
I'd love to change the world, but they won't give me the source code.
  • derekcfoley1
  • Born
  • Born
  • No Avatar
  • Registrado: Jun 19, 2009
  • Mensajes: 2
  • Status: Offline

Nota Junio 19th, 2009, 3:38 pm

UPSGuy aclamaciones!

Publicar Información

  • Total de mensajes en este tema: 9 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 36 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC