Jump to content
Search Community

xiaoxiaocainiao

Members
  • Posts

    2
  • Joined

  • Last visited

xiaoxiaocainiao's Achievements

0

Reputation

  1. Be careful about storing x/y/scaleX/scaleY/rotation instead of the transform.matrix a/b/c/d/tx/ty values because matrix values are the only ones that guarantee accuracy (x/y/scaleX/scaleY/rotation cannot accommodate any skewing that can occur with multiple selections). Here's what I envisioned: you record each item's state (the matrix values or whatever you want) initially. You listen for FINISH_INTERACTIVE_* events and do likewise (record the matrix values) in an array and ALSO record the items that were affected by that event in a separate array (for example, when a scale of mc1 and mc2 is finished, it records mc1 and mc2 in that array). Then when you need to undo, you look at that Array and see which items were affected by the last event and get those values from the associated Arrays (look in mc1's array and mc2's array and get the previous matrix values and apply them). See what I mean? how to do this, there is no such Properties or methods would u show me a demo , please
×
×
  • Create New...