Jump to content
Search Community

How to obtain the MC of a TransformItem

BernalCarlos test
Moderator Tag

Recommended Posts

The TransformEvent that gets passed to your event handler has an "items" property which is an array of the affected TransformItem instances. Remember, there can be more than one selected at a time (hence the array). So you can just grab the item from there:

 

function onMove(event:TransformEvent):void {
   trace("first item affected: " + event.items[0] + " which is DisplayObject: " + event.items[0].targetObject);
}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...