[Xerte] Re: Drag and drops
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Fri Jan 28 14:26:59 GMT 2011
hitTest returns true or false. True means even one pixel overlaps.
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 28 January 2011 14:26
To: Xerte list
Subject: [Xerte] Re: Drag and drops
So there's no way to hide from a hitTest?
________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Fri, 28 Jan 2011 14:09:02 +0000
Subject: [Xerte] Re: Drag and drops
'completely within the target': hit test will trigger on overlapping.
Are the targets rectangular? That will help with the checking.
I'd probably have the target respond, then test, then don't do anything if not in the target. Those response won't be triggered quickly in succession, so speed probably isn't an issue...
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 28 January 2011 14:07
To: Xerte list
Subject: [Xerte] Re: Drag and drops
Nothing fancy, just don't want the target to accept the item unless the item is completely within target.
I know I can do a set of conditions based on xywh to see if the thing is completely within, but was wondering if there might be an intrinsic way.
I was hoping for no bleed then I could just test if the object was still hitting background, but you're right, it's not fussy.
________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Fri, 28 Jan 2011 13:56:53 +0000
Subject: [Xerte] Re: Drag and drops
You want to constrain it to only move over the target? Or to only register the event when dropped over the target, other drops don't do anything / something different?
hitTest isn't fussy about layers, I think.
What's the scenario?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 28 January 2011 13:54
To: Xerte list
Subject: [Xerte] Drag and drops
Such fun for a Friday!
I'm thinking about using a combination of target areas and hitTest to do some drag/drop things.
Couple questions:
- Any way to constrain things so a dragged object has to be totally within the target area before it registers a hit?
- Do hitTests penetrate layers?
e.g. if I had a mask covering the screen and a target represented by a graphic in the next icon, if I drag an item completely onto the graphic will it register a hittest for both?
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110128/84bdd571/attachment-0001.html>
More information about the Xerte
mailing list