Share Posted April 10, 2016 I read transformManager document a few times, and I don't understand either one. I want to get movie clip from transformItem. I understand how to get movie clip under the event method like below : function onSelectClip(event:TransformEvent):void { var mc:MovieClip = event.items[0].targetObject as MovieClip; } But I want to get movie clip from transformManager(var manager:TransformManager) directly. So I try, var mc:MovieClip = manager.getItem(); Could you give me an advice? Link to comment Share on other sites More sharing options...
Share Posted April 11, 2016 A single TransformManager can manage many items, though. You can get an array of all of the targetObjects or items like: //array of all the target objects (DisplayObjects like MovieClips) manager.targetObjects; //array of all of the TransformItems (each has a targetObject): manager.items So if you're only managing one thing, you could do: manager.targetObjects[0] Does that help? 1 Link to comment Share on other sites More sharing options...
Author Share Posted April 11, 2016 A single TransformManager can manage many items, though. You can get an array of all of the targetObjects or items like: //array of all the target objects (DisplayObjects like MovieClips) manager.targetObjects; //array of all of the TransformItems (each has a targetObject): manager.items So if you're only managing one thing, you could do: manager.targetObjects[0] Does that help? Oh my godness, I understand perfectly. Thank you very much. From now, I can make it sense 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