--
You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To view this discussion on the web visit https://groups.google.com/d/msg/objecthandles/-/eABxizWOm7MJ.
To post to this group, send email to object...@googlegroups.com.
To unsubscribe from this group, send email to objecthandle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/objecthandles?hl=en.
The life is only complete, when there are also ResizeConstraint and RotateConstraint, which support a Rotation ;-)
--
You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To view this discussion on the web visit https://groups.google.com/d/msg/objecthandles/-/SJn6q5XolKoJ.
private function isOverlapping(ui1:UIComponent,ui2:UIComponent):void
{
var ui2Rect:Rectangle = ui2.getBounds(view);
var ui2Offset:Matrix = ui2.transform.matrix;
ui2Offset.tx = ui2.x - ui2Rect.x;
ui2Offset.ty = ui2.y - ui2Rect.y;
var ui2BitmapData:BitmapData = new BitmapData(ui2Rect.width, ui2Rect.height, true, 0);
ui2BitmapData.draw(ui2, ui2Offset);
var ui1Rect:Rectangle = ui1.getBounds(view);
var ui1BitmapData:BitmapData = new BitmapData(ui1Rect.width, ui1Rect.height, true, 0);
ui1.graphics.lineStyle(1,0x00FF00);
ui1.graphics.drawRect(0,0,ui1Rect.width,ui1Rect.height);
ui2.graphics.lineStyle(1,0xFF0000);
ui2.graphics.drawRect(0,0,ui2Rect.width,ui2Rect.height);
var ui1Offset:Matrix = ui1.transform.matrix;
ui1Offset.tx = ui1.x - ui1Rect.x;
ui1Offset.ty = ui1.y - ui1Rect.y;
ui1BitmapData.draw(ui1, ui1Offset);
var ui1Loc:Point = new Point(ui1Rect.x, ui1Rect.y);
var ui2Loc:Point = new Point(ui2Rect.x, ui2Rect.y);
if(ui1BitmapData.hitTest(ui1Loc,255,ui2BitmapData,ui2Loc,255))
{
trace("hit");
ui1.filters = [new GlowFilter()];
}
else
{
ui1.filters = [];
}
ui2BitmapData.dispose();
ui1BitmapData.dispose();
}
Are you talking about shapes that are of any form, not rectangular?
--
You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To view this discussion on the web visit https://groups.google.com/d/msg/objecthandles/-/3j-YimVx1CsJ.
--
You received this message because you are subscribed to the Google Groups "Flex ObjectHandles" group.
To view this discussion on the web visit https://groups.google.com/d/msg/objecthandles/-/bq5DVDwTzwUJ.