Help with text input / chat balloon.
Posted: Tue May 11, 2010 1:20 pm
Hey guys, I was hoping some1 would be able to help me with my current flash project. Im making a maplestory flash game and I really want to have a similar chat / text / balloon thing, that maplestory has.
As I see it, its a text input box that when you click submit or push enter the text is copied and into a speech bubble. Then after a while it fades away.
So far I've managed to code it so that the input box text is copied to the text box but I have no idea how to do the rest, and google has failed me....
mySubmitButton.addEventListener(MouseEvent.CLICK,copyText);
function copyText(e:MouseEvent):void
{
myDynamicTextField.text = myInputTextField.text;
}
addEventListener (KeyboardEvent.KEY_DOWN, keyDownHandler);
function keyDownHandler (event:KeyboardEvent):void
{
if(event.keyCode==13)
{
myDynamicTextField.text = myInputTextField.text;
}
}
thats my code.....
please help!!!!!
As I see it, its a text input box that when you click submit or push enter the text is copied and into a speech bubble. Then after a while it fades away.
So far I've managed to code it so that the input box text is copied to the text box but I have no idea how to do the rest, and google has failed me....
mySubmitButton.addEventListener(MouseEvent.CLICK,copyText);
function copyText(e:MouseEvent):void
{
myDynamicTextField.text = myInputTextField.text;
}
addEventListener (KeyboardEvent.KEY_DOWN, keyDownHandler);
function keyDownHandler (event:KeyboardEvent):void
{
if(event.keyCode==13)
{
myDynamicTextField.text = myInputTextField.text;
}
}
thats my code.....
please help!!!!!