This content has been marked as final. Show 4 replies
hey russ - getting the bg to pan in relation to the position of the mouse is no problem - but detecting when the mouse is 'not' on the stage kinda is :( BUT only if your using AS2 - AS3 has a new Stage event that is called "mouseLeave" that will fire when this happens. there might be a work around in 2 though (and of course there may be another prop that i don't know about) like for instance, you could be running an onEnterFrame loop to pan and control the movement, well lets say the if you find that the value of _xmouse is the same for a 'long' period of time (using a counter of some sort) you could then 'assume' that the mouse has left the stage, and then initiate the movement back to center. just some thoughts, again though, easier to achieve in AS3 simply because the event is available.
Hey thanks for getting back to me clbeech. Would it make a difference if I make an invisible movieclip the size of the stage and when the mouse leaves that mc that tells the background image_mc to return to its central position. Does that make any sense? Below is the code I am starting with:
np russ :) - yeah that's part of the problem really - the moment the that the mouse leaves the stage, the value of the last know mouse coordinate is the one 'kept' - so it then no longer 'registers' values beyond the stage bounds at all see. so one way may be to use a rollover, rollout on the invisible MC your talking about to trigger the opposing methods rather than using the mouse cooridinates. because the _xmouse will never return a value less than or greater than the bounds of the stage.
but the above does look like a good start :)
Ah I think I'm with you. I'll have a tinker around and see what I can come up with. Thanks again for your wisdom clbeech.