Image panning revisited

Hey yaw, long time no nuffink, so yes that means I have a new project which means I have to relearn all this stuff ago and call on your help.

So basically, I’ve used this tutorial, and got it working, changed the included script so that the movie clip scrolls in the direction, and also played around with making it scroll up/down instead of left/right, my problem now is how to get it to do both, so you call fully scroll around the image.

The other thing I want to do is have buttons which scroll with the image, can the actionscript be applied to buttons too? How do I make that work? I tried making a circle into a movie clip and pasting the action script (changing bg_mc to the instance name of the circle movie clip) on the same layer but when I tested the movie I got the following errors:

Error Scene=Scene 1, layer=Layer 4, frame=1:Line 2: Statement must appear within on/onClipEvent handler
this.onMouseMove = function() {

Error Scene=Scene 1, layer=Layer 4, frame=1:Line 7: Statement must appear within on/onClipEvent handler
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {

Total ActionScript Errors: 2 Reported Errors: 2

and the circle isn’t even there, let alone moving in relation to the mouse.

The other thing I want to do, is make the buttons fade out as they move off the stage, but as some of the buttons will be placed right at the edge of the image, for them to become more opaque the closer they are to the pointer…

I know I’m asking a lot, like I say, it’s been ages since Ilast had to do any of this stuff so your help is much appreciated…