tags:

views:

38

answers:

1

Hi,

I would like to avoid the tags overlapping each other in this small Flex project: I've this small FLEX project: http://dl.dropbox.com/u/72686/IVbeta1/main.html#

The items are LinkButtons. How can I check if they are colliding or not ? Thanks

+1  A: 

I think hitTestObject as seen here is what you're looking for. Then you can see if objects overlap and can change their positions accordingly.

Yar
do I have to place them on the canvas before to check if they overlap right ? I guess I'm going to have some flickering...
Patrick
but it works only with bitmapdata ?
Patrick
should work with any DisplayObject.
Yar
I meant, any TWO DisplayObject instances.
Yar
@Patrick, as to whether they have to be on the Canvas, you can also try placing them somewhere totally off the Canvas or making them visible=false.... I'd have to fire up my Flex IDE to tell you which would work, and today is not my Flex day.
Yar