mardi 22 septembre 2015

Flash cs6 - Actionscript 3: use input txt to change dynamic txt

I have two fields, one text input field named: txtInn and I have a text output field (dynamic text field) named txtUt

I don't get any errors but nothing happens.

Here is my code

    import flash.events.MouseEvent;

stage.focus = txtInn;

txtInn.addEventListener(KeyboardEvent.KEY_DOWN,handler);
function handler(event:KeyboardEvent){

   if(event.charCode === 13){
        txtUt.text = "You wrote: " + txtInn.text;
  }
}

http://ift.tt/1NQFpcm

Aucun commentaire:

Enregistrer un commentaire