Keyword highlighting in html Part Two
This is Part Two of a post about making a simple HTML input control that highlights key-words as you type them. It’s a follow-on from a post I made recently that walked through underlining text with wavy squiggles, which glossed over the trickiest part – actually updating the entered text as it is typed.
Now that Part One has covered why you might want to do this, and what some better alternatives are if you’re looking for something more sophisticated, I’m just gonna go ahead and present ALL the code and then walk through it with explanations: Read more…
Categories: Development, Internet Tags: contenteditable, css, html, input, javascript, styling, Text
ActionScript 3.0 TextField Style and Event gotchas
Yesterday I ported some experimental syntax tree code I’d written in C# over to Flash and ActionScript. It’s a tribute of the richness of ActionScript 3.0 that such code could be ported so easily.
To test the code out I needed to be able to input text. No worries. Add a TextField.
It’d been a while since I’d done this in ActionScript, and I hit a couple of “noob” gotchas that can even get an old dog like this one. So in case you’ve hit the same problems, and are being misled by the documentation, here are a couple of pointers…
Read more…
Categories: Development, Flash, Games, Internet Tags: Actionscript 3.0, addEventListener, Adobe, best practice, Flash, Format, Gotcha, Style, Text, TextField