Comunidad de diseño web y desarrollo en internet online

flex 4 problemas con el teclado

Citar            
MensajeEscrito el 30 Sep 2010 03:30 pm
estimados necesito hacer lo siguiente
necesito q al precionar las flechas acciones un evento pero necesito
en cualquier parte de la aplicacion

e intentado lo siguiente pero no me a funcionado

Código ActionScript :

protected function application1_creationCompleteHandler(event:FlexEvent):void
         {
            FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_DOWN, preciono);
         }
protected function preciono(event:KeyboardEvent):void{
            Alert.show(event.keyCode.toString());
            if(event.keyCode==38){
               cober.selectedIndex=cober.selectedIndex+1;
            }
         }

Por anikilatorbeta

42 de clabLevel



 

chrome
Citar            
MensajeEscrito el 30 Sep 2010 03:55 pm
¿Por que no lo agregas a Application?

application.addEventListener(KeyboardEvent.KEY_DOWN, preciono);

Un detalle, presiono es con S

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 30 Sep 2010 04:03 pm
esque en flex 4 es

Código ActionScript :

FlexGlobals.topLevelApplication

ya no se ocupa el

Código ActionScript :

Application.application

asi q siguie sin funcionarme :(
lo me ocurre q por ejemplo pongo un combobox teniendo la programacion anterior y funciona pero yo necesito q no este sobre algun componente necesito q simplemente la persona al estar en el sitio web y precione las flecha se mueva

saludos

Por anikilatorbeta

42 de clabLevel



 

chrome
Citar            
MensajeEscrito el 30 Sep 2010 04:13 pm
Ah, Flex 4, sorry.
Dale foco al swf si quieres que funcione sin clickar en nada, eso lo haces con JS

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

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