Dec 30
AceWeb Development & Design ActionScript, AIR, Flash, Flex, Programming
Applicable to: Adobe ActionScript 3, Adobe Flex, Adobe AIR
This simple operation isn’t very obvious in ActionScript 3. TheĀ TextInput element has a boolean property called focusEnabled, but this doesn’t seem to do anything (it’s probably meant for other purposes, didn’t take the time to check).
The way achieve this is two-fold:
stage.focus = yourTextField;
yourTextField.setSelection(0,0);
If your textfield contains text and you wish to place the caret to the end, you would probably go about it like so:
stage.focus = yourTextField;
yourTextField.setSelection(0, yourTextField.length);
Makes sense now you know about it, huh?
Jan 24
AceFreebies, Tech Articles development, free, Microsoft, notepad++, Programming, sourceforge, web, windows
I’ve come to appreciate Notepad++ as a full-blown source code editor, whereas in the past it used to be a second-class citizen, somewhat. I kept it around because it operates and loads blazingly fast, especially handy when you don’t have the time to start Dreamweaver. Though Notepad++ is a lot more than a quick app…
It supports everything you’d expect from a well-seasoned code editor, amongst other features:
- Syntax Highlighting & Syntax Folding
- User Defined Syntax Highlighting
- Code Auto-completion
- Regular Expression Search/Replace
- Zooming
- Brace & Indent Highlighting
- Macros
- Integration into the shell
You should see Notepad++ as an all-round replacement for Windows’ built-in Notepad and a lot more. It supports a vast array of programming languages, yet is specialized enough to be used for web authoring, too: it’ll recognize nested languages effortlessly, e.g. XHTML, CSS, PHP and Javascript in one page.
Notepad++ is completely free of charge and subject to the GPL license.
Latest Comments