One of those things that the browser has built in that you wish would just work in Flash – a simple TextField undo & redo. My brother recently released a really slick solution to the problem. It isn’t a UI component – it sits above the display list and works with all types of Flash TextFields: Flex components, Flash components, bare naked TextFields. It’s really small (1 manager and 3 command classes) and you attach it to the highest level display object necessary for a custom level of influence – so if you want the whole app to be effected then you attach it to the root.
Here’s what the API looks like:
var undoTextFields:UndoTextFields = new UndoTextFields();
undoTextFields.target = this;
Boom! done. (sound effect not included) And it works just like the browser – each TextField has its own undo/redo independent of the others.
NOTE:
The component uses the Flight Framework history without adopting the rest of the framework methodology. A great use of Flight, as it prescribes utility and a minimalistic approach to development. I’ll probably demo this utility at my upcoming presentation.
[...] here’s his introductory blog post about the “undo textfields” library. (via Tyler Wright via Gilles [...]
[...] > xtyler Finally! Undo in Flash/Flex Texfields [...]
I want to implement the drawing board to undo and redo the drawing by users.