Skip to main content
June 11, 2009
Question

How to add external action in UndoManage?

  • June 11, 2009
  • 1 reply
  • 544 views

Dear sirs,

Is possible add an action that occurs in UndoManage outside textflow?

I have 3 text flow, I can sync all only using same UndoManage in interacionManage, but I need that the moment that is added a new textflow also can is undo.

Example:

History:
1 - Add Bold
2 - Add Italic
*Add a new TextFlow
3 - Change color to red

When user call undo, before 3, I need remove the textflow.

Thanks in advance.

This topic has been closed for replies.

1 reply

Adobe Employee
June 12, 2009

Yes that's the intention.  The undo code was separated into flashx.undo for just that purpose.

You will have to create an operation class for your operation that implements the IOperation object.  I'd reccomend creating a single UndoManager instance and passing it to all the EditManagers that you create.  Use the UndoManager APIs to manage the undo stack as you do, undo and redo your operation.

Richard