Question
TextLayout component & KeyboardEvent
im trying to use a TextLayout component as a single line text
input
i sat the component property to ReadWrite
but i didn't find a single line property ?
also i want to add a Keyboard event
TextLayout.addEventListener(KeyboardEvent.KEY_DOWN,xEnter)
function xEnter(k:KeyboardEvent){
if (k.keyCode == 13) {
trace(TextLayout.textFlow.flowComposer.getLineAt(0).textLine.textBlock.content.text)
}
}
is that the right way? it doesn't work for me?
i sat the component property to ReadWrite
but i didn't find a single line property ?
also i want to add a Keyboard event
TextLayout.addEventListener(KeyboardEvent.KEY_DOWN,xEnter)
function xEnter(k:KeyboardEvent){
if (k.keyCode == 13) {
trace(TextLayout.textFlow.flowComposer.getLineAt(0).textLine.textBlock.content.text)
}
}
is that the right way? it doesn't work for me?
