as3 component issue

Discussion in 'Programming' started by questuk, May 14, 2013.

  1. #1
    Hello People, I hope this is the correct forum to this question. Anyhow, I have a small issue in Flash. I have composed a message in the text input component. When I click the button the message is transferred and displayed in the text area. Thats worked fine!
    However, the message is still visible in the text input component and I want it to be removed from there as soon as I click pn the button.
    I have tried many times to alter the code but the problem still persists.
    I am not very good at computer programming so.. If you know how I can fix this that be great guys!
    btn_Send.addEventListener(MouseEvent.CLICK, doSend, false, 0, true);
    function doSend($e:Event):void{
    if(txt_input.text != ""){
    txt_area.appendText(txt_input.text+"\n");
    txt_area.verticalScrollPosition = txt_area.maxVerticalScrollPosition;
    txt_input.text = "";
    }
    txt_input.setFocus();
     
    questuk, May 14, 2013 IP