Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
matshriver

trouble deleting objects

Recommended Posts

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

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

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.
×