Flash CS5 -- text starting in the middle automatically
I'm trying to make a simple program that manipulates data input by users by c开发者_如何学Pythonhanging it into a format that a later project will decode and re-manipulate for a jeopardy-type game.
I'm running into what is probably a VERY simple fix, but I can't find it.
When I create my text box and start typing, it automatically has 3 lines instead of just one, as if I've already started typing and pressed enter two times. I've checked to make sure that there wasn't already text inside of the box before running it, checked every option inside of the text properties thoroughly and googled ones that had functions that were unknown to me, tried searching google for help, tried searching here for help, and various other things that would seem like a small mistake. The closest thing I found was the exact opposite: Flash vertical text alignment in middle
It isn't just one text box -- it's every one of them in my program.
I know I could probably run some AS3 code to fix it, but I would rather not have to resort to all of that, as it's supposed to be just a simple little program.
Example:
- Line 1 <--- where I would like text to start
- Line 2
- Line 3 <--- where text starts
- Line 4
- etc
Any help would be greatly appreciated. Thanks in advance.
Edit 1: Forgot to add that the textbox is multiline (obviously, but in case someone didn't know)
You could empty the textfield when someone clicks on the textfield:
myTextField.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);
private function onFocusIn(e:FocusEvent):void {
myTextField.text = ""
// this is triggered when you click your mouse or tab to the textfield where you would start typing
}
精彩评论