Share Posted August 6, 2012 Hello, Is there a function to copy/paste a TransformItem? If not, how can I do this easily? Thanks a lot for answer. Florian Link to comment Share on other sites More sharing options...
Share Posted August 6, 2012 No, I'm sorry but there isn't copy/paste functionality built into TransformManager. You'd need to duplicate your DisplayObject yourself (which is easy if it's just a Bitmap or something, using its bitmapData duplicating a complex MovieClip or something that has custom properties/methods, children, etc. is more challenging). Once you have your object duplicated, though, it is easy to copy the transformational data by simply using the transform.matrix data like myNewObject.transform.matrix = myOldObject.transform.matrix. Then just addItem() to your TransformManager and you're done. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now