2009-06-10 8 views
-1

Besoin d'aide avec la désactivation de la touche backspace pour empêcher la page précédente de chargement FLEX

<mx:Label text="SAVIO"/> 
    <mx:ComboBox focusEnabled="true"></mx:ComboBox> 
    <mx:Button label="Button" focusEnabled="true"/> 
    <mx:Script> 
      <![CDATA[ 
       import mx.controls.Alert; 
       private var t:TextField; 
        private function init():void 
        { 
          t=new TextField(); 
          nom.setFocus(); 
          addEventListener(KeyboardEvent.KEY_UP,xxx); 
          addEventListener(KeyboardEvent.KEY_DOWN,xxx); 
        } 

        private function xxx(event:KeyboardEvent):void 
        { 
          if(event.type == KeyboardEvent.KEY_DOWN && event.ctrlKey) 
          setFocus(); 
          else nom.setFocus(); 
          nom.selectionEndIndex = nom.selectionBeginIndex = nom.text.length; 

           if (event.target == t && event.keyCode == 8) //Here is the problem Please Help.. 
           { 

           } 
        } 


      ]]> 
    </mx:Script> 

Répondre

-1

e.keyCode = Keyboard.ESCAPE est

USEFULL
Questions connexes