Avanzar y retroceder usando el teclado

Ultimamente, tuve esta urgencia y consultando a San Google encontre la respuesta, y venia de la Cristalab, bueno el tip trata de avanzar y retroceder con el teclado, pero frame for frame.

Y un claber HernanRivas dio la solucion ^^

onEnterFrame = function () {
if (Key.isDown (Key.RIGHT)) {
//
// AQUÍ IRÍAN LAS ACCIONES DE SALTAR DE FOTOGRAMA
//
}
};

Por el momento pondre esto, en el trascurso del dia lo termino ^^

3 thoughts on “Avanzar y retroceder usando el teclado

  1. no creo q usar onEnterFrame venga bien, mejor usa esto:
    [code]
    var listKey:Object = new Object();
    listKey.onKeyDown = function () {
    switch (Key.getCode()) {
    case Key.LEFT:
    //izquierda
    break;
    case Key.RIGHT:
    //derecha
    break;
    }
    }
    Key.addListener(listKey);
    [/code]
    la logica es la misma solo que en vez de onEnterFrame usas directamente al clase Key.

  2. Gracias Rzo, modificare el post y pondre una muestra de como resultos ^^, gracias nuevamente

  3. Joder, pley, usar un EnterFrame para eso?? Es algo rebuscado, es como poner un loop infinito casi… XD Está todo el rato haciendo eso. :o wnz:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>