Hi Jim,

Are these hotspots "connected" to each other by arising from one single function? Like, are they equally spaced, (as on a grid), follow the perimeter of a circle or
any other math function?

My guess would be no, so...

There can't be any way other than looping through hotspots to see if you are near one.
One thing that might be of help though is Grand Skinner's Proximity class.
It might be able to save you lots of calculations, since you could only check for hotspots
that are near a specified area. You might want to check that out.

Just a thought...

Dimitrios Bendilas

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 03, 2006 10:32 PM
Subject: [Flashcoders] Q:creating a 'snappable' class


Hi
I'm creating a 'snappable' class, that would work with a predefined set of x,y pairs or 'hotspots'. When a dragged movieclip was within a 'offset' distance of any of these hotspots it would 'snap to' and stop drag. The best way of doing this I thought would be to simply pass an array of predefined x,y pairs as an object into the class when it was instantiated. However, having to cycle thru an array, especially if there are a huge number of 'hotspots', while dragging doesn't seem very efficient....can anyone suggest a better way of approaching this?

Thanks in advance
Jim Bachalo

[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
            - Bruce Mau,'LifeStyle'
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to