The distance() expression only gives you the distance between two points. To get the closest distance between a point and a shape it will be more involved. Take the example of a square shape, you'll need to get the distance from all the corners and all the edges and pick the lowest value.
Basically you'd setup the imagepoints on your object like this:
Where 0 is the origin.
Then to calculate the distances you'd use the distance() expression to get the distance to a point, and for the distance to a line you'd use a vector dot product to see if the the projected point is on the line, then a vector cross product is used to get the distance.
[url=https://dl.dropboxusercontent.com/u/5426011/examples34/closest_dist.capx]https://dl.dropboxusercontent.com/u/542 ... _dist.capx[/url]
Now if that is too much math you can go for an approximate solution: Put a lot of instances all around the shape you want to get the closest distance to. It should look like dots going around the object's edge, the closer together the better. Then you can then do an event like this:
dotSprite: pick closest to (mouse.x, mouse.y)
--- set text to distance(dotSprite.x, dotSprite.y, mouse.x, mouse.y)
I see, so maybe distance isn't so much what I'm looking for? What I need really is an expression that tests if a points x/y is overlapping an instance. i know objects can be testing if they're overlapping, but could a point be tested with system expressions?