Jump to content
GreenSock

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

Click-Through Item Selection Bounds

Recommended Posts

Hi there,

 

I have recently purchased TransformManager and we've been able to progress quite well with it. I'm having some issues with it now that I'm a bit stuck on.

 

I've been able to overwrite the functionality of the TransformManager to deal with alpha-based picking so that .png items can be selected only if the user clicks on solid-colors. Transparent alpha pixels get ignored for picking. TransformItems that reside underneath the top most DisplayObject don't seem to be tested against the mouse click however.

 

So the topmost TransformItem receives an "OnMouseDown" event, it fails because you're touching a transparent part, so I'd like to continue testing down the items that exist in the scene.

 

Should I just override how I'm dealing with this stuff by writing some custom code on the onMouseDown handler in the TransformManager?

 

Again, the solution that I'd prefer (and probably faster) would be to just do this on a per-item, event-handling basis, ignoring the canvas depth sorting. By this, I mean that I wouldn't have to parsing through all of the items in the canvas / transform manager.

 

Any information regarding on how I should handle this feature requirement would be great!

 

Thanks,

 

- Roberto Alcantara

Link to comment
Share on other sites

Just wanted to say that I got it working by parsing through the scene.

 

I'm not sure if this is an "non-optimal" scenario but it doesn't seem to be causing any issues. If there are any significant slowdowns, I'll optimize it further.

 

If anyone can think of a way to somehow make it more attached to the event handler of each item, that would be cool, but if not, I found a solution to move forward with.

 

Thanks again!

 

- Roberto Alcantara

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.

×