> On 5/10/07, Danny Kodicek <[EMAIL PROTECTED]> wrote: > > I've done it in the past (although in the end I didn't use it) by > > creating a function that homes in on the exact coordinates of the > > insertion point by adding text into a hidden field and > using textWidth > > / textHeight (the tricky part is finding the start of the current > > line, the rest is fairly easy, although I'm not sure how you'd do > > centre-aligned text). It sounds hideous, but actually Flash > is pretty > > fast at that kind of thing and it worked fine in real-time for > > reasonably short text. If your text is single-line, > obviously it's much easier. > > Just as an aside - all this sort of stuff is a lot easier in > AS3, and it's much much faster. Take a look at the source > code to the RichTextEditor control for some ideas. > > As a benchmark, AS3 is fast enough that I can take the HTML > content of the rich text editor, transform it into a > different XML document, run some analysis on it, add extra > markup and transform it _back_ into an HTML document that > gets inserted back into the rich text editor between > keystrokes without the user noticing; without any slowdown. > For a multi-page document. Now that's _fast_. :-)
Yeah, but I bet it doesn't work with Arabic ;) Danny _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com