Mover un símbolo a una sertain ubicación en el tiempo?

  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 20th, 2004, 7:58 am

HI realmente necesito ayuda con esto.
Im wodering si pudiera hacer símbolo trasladarse a un destino es decir, x +50 en el transcurso del tiempo en un onRelease acción. No es un símbolo de toma continua moviendo en una dirección. Quiero que sea sólo en un marco que, si es posible. También utilizando un falso / verdadero código para que éste sepa si el sumbol debe volver a su posición original. por el paso del tiempo me refiero a no hacer el símbolo de pasar directamente a ese lugar específico, tendría una velocidad por lo que smothly diapositivas a ese lugar.

su armonización dto explicar, es un ejemplo en Windows XP cuando usted abre una ventana normal MAPP hay un menú a la izquierda y al hacer clic sobre un pequeño botón de un menú se desliza hacia abajo y al hacer clic de nuevo que se desliza hacia atrás. Por supuesto su fácil de hacer en un botón, pero eso no es lo que quiero. Se debe avanzar mediante acciones cripta.

Thx! :D
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 20th, 2004, 7:58 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 20th, 2004, 8:24 am

onEnterFrame () es lo que busca creo.
en el botón,
Código: [ Select ]
on(release){
  this._parent.movieClipToMove.easeX(xValue, slowness);
}
  1. on(release){
  2.   this._parent.movieClipToMove.easeX(xValue, slowness);
  3. }

sustituir "movieClipToMove" con el nombre de la instancia del movieclip que desea mover. "xValue es la posición que mover a lo largo del tiempo, y cuanto menor sea el número que puso de" lentitud ", el más rápido el movieclip se moverá.

Ahora, para que eso funcione se necesita este prototipo en uno de sus líneas de tiempo.
Código: [ Select ]
MovieClip.prototype.easeX = function(value, speed) {
  this.onEnterFrame = function() {
   this.xV = Math.floor(value-this._x);
   this.xV ? this._x += this.xV/speed : (this._x=value, delete this.onEnterFrame);
  }
}
  1. MovieClip.prototype.easeX = function(value, speed) {
  2.   this.onEnterFrame = function() {
  3.    this.xV = Math.floor(value-this._x);
  4.    this.xV ? this._x += this.xV/speed : (this._x=value, delete this.onEnterFrame);
  5.   }
  6. }

Nada cambió en las necesidades que a menos que desee _y en vez de _x.
Strong with this one, the sudo is.
  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 20th, 2004, 12:17 pm

Thx hombre, realmente apreciamos su ayuda :) los malos lo pruebe
  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 20th, 2004, 6:47 pm

Me di cuenta de una cosa que no funciona:
Código: [ Select ]
this.lalala.easeY(this._y+80, 7);

insyead de búsqueda de la _y del botón y agregar IIT con 80 que se mueve el símbolo a la posición "etapa" Y80 y no a la button._y más el 80.

También traté de esto, pero resultó igual:
Código: [ Select ]
yValue = this._y+80
this.lalala.easeY(yValue, 7);
  1. yValue = this._y+80
  2. this.lalala.easeY(yValue, 7);


esto es algo que esta función no puede nuderstand? con las cosas im tratando de hacer tengo que usar getProperty + "número"


Asimismo, se trata de EZ, pero soy nuevo como: ¿Cómo puedo hacer un código en el mismo botón para que un símbolo con el que el código de mover el suyo para 2 plazas, ida y vuelta. como:
if (ISUP = false)
"el código de movimiento +"
ISUP = true

if (ISUP = true)
"el código en movimiento -"
ISUP = false
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 21st, 2004, 6:29 am

Código: [ Select ]
yValue = this.lalala._y+80
this.lalala.easeY(yValue, 7);
  1. yValue = this.lalala._y+80
  2. this.lalala.easeY(yValue, 7);

Se estaba usando el _y del MC llamando a la acción.

Para pasar a lado a otro y puede utilizar somthing como este,
Código: [ Select ]
on(release){
if(this.lalala.yPos){
  this.lalala.yPos = this.lalala.yPos-80;
  this.lalala.easeY(this.lalala.yPos, 7);
  this.lalala.yPos = false;
}else{
  this.lalala.yPos = this.lalala._y+80;
  this.lalala.easeY(this.lalala.yPos, 7);
}
}
  1. on(release){
  2. if(this.lalala.yPos){
  3.   this.lalala.yPos = this.lalala.yPos-80;
  4.   this.lalala.easeY(this.lalala.yPos, 7);
  5.   this.lalala.yPos = false;
  6. }else{
  7.   this.lalala.yPos = this.lalala._y+80;
  8.   this.lalala.easeY(this.lalala.yPos, 7);
  9. }
  10. }
Strong with this one, the sudo is.
  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 21st, 2004, 8:06 am

Sí, yo quería que el uso _y el botón de llamar a la acción, que no funciona? ¿Puedo usar un "dummy mC" que es igual tan grande como el botón y el uso que los símbolos _y?
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 21st, 2004, 9:11 am

¿Dónde está
Código: [ Select ]
this.lalala.easeY(this._y+80, 7);

¿Es en el botón envuelto como,
Código: [ Select ]
on(release){
 this.lalala.easeY(this._y+80, 7);
}
  1. on(release){
  2.  this.lalala.easeY(this._y+80, 7);
  3. }


¿Dónde está lalala?, ¿Está anidado dentro del botón?

Ahora mismo parece como si la _y del botón es 0.
Es el _height del botón 80 por casualidad?
Strong with this one, the sudo is.
  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 21st, 2004, 2:38 pm

no, :D lo he descubierto ahora, funciona para mí. parece que usted no puede obtener el _y de un botón, ¿no? cuz i hizo un MC maniquí y luego wokred la perfección.
Aquí está el código:
Código: [ Select ]
on (release) {
    if (this.mCtomove.yPos) {
        this.mCtomove.yPos = this.dummymC._y-45;
        this.mCtomove.easeY(this.mCtomove.yPos, 7);
        this.mCtomove.yPos = false;
    } else {
        this.mCtomove.yPos = this.dummymC._y+10;
        this.mCtomove.easeY(this.mCtomove.yPos, 7);
    }
}
  1. on (release) {
  2.     if (this.mCtomove.yPos) {
  3.         this.mCtomove.yPos = this.dummymC._y-45;
  4.         this.mCtomove.easeY(this.mCtomove.yPos, 7);
  5.         this.mCtomove.yPos = false;
  6.     } else {
  7.         this.mCtomove.yPos = this.dummymC._y+10;
  8.         this.mCtomove.easeY(this.mCtomove.yPos, 7);
  9.     }
  10. }


si le quitas el dummymC como en el código gif "alt =": P "title =" Razz "/> theres modo extraño, el MC se mueve si la tensión U, haga clic en el botón. sorta que se mueve a donde quiera que quiere :D
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 21st, 2004, 4:39 pm

:scratchhead: Im sólo va a leer este tomarrow, tal vez tendrá sentido entonces :lol:
Strong with this one, the sudo is.
  • Warshy
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Oct 20, 2004
  • Mensajes: 6
  • Status: Offline

Nota Octubre 21st, 2004, 5:12 pm

heh, :D así de todos modos thx por la ayuda hombre, que ahora funciona como el menú Xp :wink:
[flash width = 175 altura = 365 loop = false] http://hem.bredband.net/elfsoftwilight/menu.swf [/ flash]

tal vez la flashmovie le ayudarán a comprender :P
theres puede ver una pequeña ventana de negro en la parte superior izquierda de cada botón, esa es la maniquí MC.


oh, y una Q: i notado recientemente que el flash tiene la etiqueta wmode transpare código ya no en ella. i tiene un invisionfree bordo y me gustaría tener que fijar demasiado :)

Publicar Información

  • Total de mensajes en este tema: 10 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 32 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