Foros del Web » Creando para Internet » Flash y Actionscript »

Menu en movimiento ¿Como detenerlo con un evento de Mouse?

Estas en el tema de Menu en movimiento ¿Como detenerlo con un evento de Mouse? en el foro de Flash y Actionscript en Foros del Web. Hola el caso es que tengo un codigo de un menu en 3D, este son categorias que van girando pero no se como hacer para ...
  #1 (permalink)  
Antiguo 14/06/2011, 17:30
Avatar de jorgeOnLine  
Fecha de Ingreso: septiembre-2008
Ubicación: Guadalajara Jalisco Mexico
Mensajes: 36
Antigüedad: 15 años, 7 meses
Puntos: 0
Pregunta Menu en movimiento ¿Como detenerlo con un evento de Mouse?

Hola el caso es que tengo un codigo de un menu en 3D, este son categorias que van girando pero no se como hacer para que se detenga cuando se coloca el mouse sobre el nombre de la categoria.

Este es mi archivo

http://sivanu.com/Flash/categorias-3D.swf

Este es mi codigo
------------------------------

onClipEvent (load) {
radio = 50.0;
posX = 100;
posY = 200;
grados = 360;
vel = -0.06;
nombre = "Acura";
}
onClipEvent (enterFrame) {
if (_root.boton == 0) {
x = Math.cos(grados)*radio;
y = Math.sin(grados)*2*radio;
this._xscale = x+posX/3;
this._yscale = x+posY/3;
this._x = x+posX;
this._y = y+posY;
grados += vel;
}

}
on (press) {
getURL("http://sivanu.com/inicio/autopartes/1-acura.html","_self");
}


------------------------------
La verdad no tengo mucha experiencia en flash.
Agradezco sus comentarios.
  #2 (permalink)  
Antiguo 14/06/2011, 17:44
Avatar de jatg  
Fecha de Ingreso: abril-2011
Ubicación: caracas
Mensajes: 152
Antigüedad: 13 años, 1 mes
Puntos: 15
Respuesta: Menu en movimiento ¿Como detenerlo con un evento de Mouse?

hola como estas porque no pruebas con algo asi
Código PHP:
Ver original
  1. onClipEvent(load)
  2. {
  3.     radio = 70;
  4.     posX = 300;
  5.     posY = 400;
  6.     grados = -100;
  7.     vel = 0.08;
  8.     nombre = "INICIO";
  9. }onClipEvent(enterFrame)
  10. {
  11.     if (_root.boton == 0)
  12.     {
  13.         x = Math.cos(grados) * radio;
  14.         y = Math.sin(grados) * 3 * radio;
  15.         this._xscale = x + posX / 3;
  16.         this._yscale = x + posY / 3;
  17.         this._x = x + posX;
  18.         this._x = y + posY;
  19.         grados = grados + vel;
  20.     }
  21. }
  22. _________________________________________________________________
  23. onClipEvent(load)
  24. {
  25.     radio = 70;
  26.     posX = 300;
  27.     posY = 400;
  28.     grados = 200;
  29.     vel = 0.08;
  30.     nombre = "TUTO5";
  31. }onClipEvent(enterFrame)
  32. {
  33.     if (_root.boton == 0)
  34.     {
  35.         x = Math.cos(grados) * radio;
  36.         y = Math.sin(grados) * 3 * radio;
  37.         this._xscale = x + posX / 3;
  38.         this._yscale = x + posY / 3;
  39.         this._x = x + posX;
  40.         this._x = y + posY;
  41.         grados = grados + vel;
  42.     }
  43. }
  44. _____________________________________________________________________
  45. onClipEvent(load)
  46. {
  47.     radio = 70;
  48.     posX = 300;
  49.     posY = 400;
  50.     grados = 500;
  51.     vel = 0.08;
  52.     nombre = "TUTO4";
  53. }onClipEvent(enterFrame)
  54. {
  55.     if (_root.boton == 0)
  56.     {
  57.         x = Math.cos(grados) * radio;
  58.         y = Math.sin(grados) * 3 * radio;
  59.         this._xscale = x + posX / 3;
  60.         this._yscale = x + posY / 3;
  61.         this._x = x + posX;
  62.         this._x = y + posY;
  63.         grados = grados + vel;
  64.     }
  65. }
  66. ____________________________________________________________________
  67. onClipEvent(load)
  68. {
  69.     radio = 70;
  70.     posX = 300;
  71.     posY = 400;
  72.     grados = 800;
  73.     vel = 0.08;
  74.     nombre = "TUTO3";
  75. }onClipEvent(enterFrame)
  76. {
  77.     if (_root.boton == 0)
  78.     {
  79.         x = Math.cos(grados) * radio;
  80.         y = Math.sin(grados) * 3 * radio;
  81.         this._xscale = x + posX / 3;
  82.         this._yscale = x + posY / 3;
  83.         this._x = x + posX;
  84.         this._x = y + posY;
  85.         grados = grados + vel;
  86.     }
  87. }
  88. __________________________________________________________________
  89. textoFinal = texto2;
  90. var caracteres = textoFinal.split("");
  91. texto2 = "_";
  92. indice = 0;
  93. delete _root.onEnterFrame;
  94. _root.onEnterFrame = function ()
  95. {
  96.     if (indice < caracteres.length)
  97.     {
  98.         texto2 = texto2.substring(0, texto2.length - 1);
  99.         texto2 = texto2 + (caracteres[indice] + "_");
  100.         ++indice;
  101.         return;
  102.     }
  103.     delete this.onEnterFrame;
  104.     texto2 = textoFinal;
  105. }
  106. ;
  107. boton = 0;
  108. stop();
__________________
www.josealexis.net
  #3 (permalink)  
Antiguo 14/06/2011, 19:06
Avatar de jorgeOnLine  
Fecha de Ingreso: septiembre-2008
Ubicación: Guadalajara Jalisco Mexico
Mensajes: 36
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Menu en movimiento ¿Como detenerlo con un evento de Mouse?

Cita:
Iniciado por jatg Ver Mensaje
hola como estas porque no pruebas con algo asi
Código PHP:
Ver original
  1. onClipEvent(load)
  2. {
  3.     radio = 70;
  4.     posX = 300;
  5.     posY = 400;
  6.     grados = -100;
  7.     vel = 0.08;
  8.     nombre = "INICIO";
  9. }onClipEvent(enterFrame)
  10. {
  11.     if (_root.boton == 0)
  12.     {
  13.         x = Math.cos(grados) * radio;
  14.         y = Math.sin(grados) * 3 * radio;
  15.         this._xscale = x + posX / 3;
  16.         this._yscale = x + posY / 3;
  17.         this._x = x + posX;
  18.         this._x = y + posY;
  19.         grados = grados + vel;
  20.     }
  21. }
  22. _________________________________________________________________
  23. onClipEvent(load)
  24. {
  25.     radio = 70;
  26.     posX = 300;
  27.     posY = 400;
  28.     grados = 200;
  29.     vel = 0.08;
  30.     nombre = "TUTO5";
  31. }onClipEvent(enterFrame)
  32. {
  33.     if (_root.boton == 0)
  34.     {
  35.         x = Math.cos(grados) * radio;
  36.         y = Math.sin(grados) * 3 * radio;
  37.         this._xscale = x + posX / 3;
  38.         this._yscale = x + posY / 3;
  39.         this._x = x + posX;
  40.         this._x = y + posY;
  41.         grados = grados + vel;
  42.     }
  43. }
  44. _____________________________________________________________________
  45. onClipEvent(load)
  46. {
  47.     radio = 70;
  48.     posX = 300;
  49.     posY = 400;
  50.     grados = 500;
  51.     vel = 0.08;
  52.     nombre = "TUTO4";
  53. }onClipEvent(enterFrame)
  54. {
  55.     if (_root.boton == 0)
  56.     {
  57.         x = Math.cos(grados) * radio;
  58.         y = Math.sin(grados) * 3 * radio;
  59.         this._xscale = x + posX / 3;
  60.         this._yscale = x + posY / 3;
  61.         this._x = x + posX;
  62.         this._x = y + posY;
  63.         grados = grados + vel;
  64.     }
  65. }
  66. ____________________________________________________________________
  67. onClipEvent(load)
  68. {
  69.     radio = 70;
  70.     posX = 300;
  71.     posY = 400;
  72.     grados = 800;
  73.     vel = 0.08;
  74.     nombre = "TUTO3";
  75. }onClipEvent(enterFrame)
  76. {
  77.     if (_root.boton == 0)
  78.     {
  79.         x = Math.cos(grados) * radio;
  80.         y = Math.sin(grados) * 3 * radio;
  81.         this._xscale = x + posX / 3;
  82.         this._yscale = x + posY / 3;
  83.         this._x = x + posX;
  84.         this._x = y + posY;
  85.         grados = grados + vel;
  86.     }
  87. }
  88. __________________________________________________________________
  89. textoFinal = texto2;
  90. var caracteres = textoFinal.split("");
  91. texto2 = "_";
  92. indice = 0;
  93. delete _root.onEnterFrame;
  94. _root.onEnterFrame = function ()
  95. {
  96.     if (indice < caracteres.length)
  97.     {
  98.         texto2 = texto2.substring(0, texto2.length - 1);
  99.         texto2 = texto2 + (caracteres[indice] + "_");
  100.         ++indice;
  101.         return;
  102.     }
  103.     delete this.onEnterFrame;
  104.     texto2 = textoFinal;
  105. }
  106. ;
  107. boton = 0;
  108. stop();
--------------------------------------------

Gracias x tu pronta respuesta, voy a probar y te cuento...Saludos
  #4 (permalink)  
Antiguo 15/06/2011, 18:49
Avatar de jorgeOnLine  
Fecha de Ingreso: septiembre-2008
Ubicación: Guadalajara Jalisco Mexico
Mensajes: 36
Antigüedad: 15 años, 7 meses
Puntos: 0
Pregunta Respuesta: Menu en movimiento ¿Como detenerlo con un evento de Mouse?

Estimado jatg, probe pero la verdad no mequeda bien no tengo experiencia en flash pero lo que necesito es algo asi

http://sivanu.com/Flash/menu3dok.swf

Que se detenga cuando coloco el mouse sobre el menu o sobre la palabra..


Muchas gracias y perdon x tanto rollo..

Etiquetas: eventodemouse
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:58.