var KP:Object=new Object()
Key.addListener(KP);
KP.onKeyDown = function(){
if(Key.isDown(Key.SPACE)){
   Key.removeListener(KP);
   delete KP // not necesarry I guess
}
}

Stephen Hueners wrote:
I'm setting up a listener for the Enter key in a login portion of my movie
and need to delete  it after it runs so that if the user hits ENTER later in
the original function is not called. I _thought this was the correct way to
do this but testing proves me wrong:

var keyForm = new Object();
keyForm.onKeyDown = function(){
        if (Key.getCode() == Key.ENTER){
                _level0.loadLoginVars("login", ID.text, Pass.text);
                this.gotoAndStop("checking");
                delete keyForm;
        };
}
Key.addListener(keyForm);


Many Thankx
--steve...


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to