Share Posted January 3, 2009 Hi, I'm having trouble deleting objects. The code I'm using works but it generates an error #1009: Cannot access a property or method of a null object reference. at gs.transform::TransformItem/onMouseUp() var clip4Item:TransformItem=manager.addItem(array[increm]); clip4Item.addEventListener(TransformEvent.SELECT, Identify); function Identify($e:TransformEvent):void { for (var i=0; i removeChild(manager.selectedTargetObjects); } } Thanks very much for any help. Link to comment Share on other sites More sharing options...
Share Posted January 5, 2009 Yep, it's because you're removing the item from the stage without doing a removeItem() or destroy() of the TransformItem first. I updated the class just now, though, to accommodate this sort of thing, so feel free to get it from the URL in your purchase confirmation e-mail. That should solve it. 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