This content has been marked as final. Show 2 replies
back = map
front = screen/mask
on button click handler, do:
if(back._x+back._width > front._x+front._width)
provided the registration point for both front and back are at the top left
hope this helps.
"grahamdeuchar" <firstname.lastname@example.org> wrote in message
> Hey guys,
> I was never the world's greatest mathematician, so there is probably a
> basic calculation you can perform to achieve this, but would anyone happen
> be able to help with this:
> I have a Flash map I've been developing, in which users can scroll
> left/right/up/down/down-left etc around the map. The map itself is in a
> movieclip, so for zooming I will be simply increasing/decreasing the scale
> the movieclip.
> My problem lies in trying to restrict how far the user can scroll with my
> buttons - at the moment they can scroll the map movieclip right off the
> till it's no longer visible - how do I limit how far they can scroll based
> the map/viewing area position AND cater for the zoom - obviously these
> positions will change as the scale of the map does!
> Any help would be greatly appreciated guys!
Thanks for your reply!
I'm probably being really stupid but I still can't get it working :(
I've attached my code as an example - that's the left button's action. Can anyone see any problems?