Scriptable mask

Hello all, I have a question about motion of a mask i have made… basically what i am doing is to make something along the lines of the “scriptable mask” tutorial Inigo was kind enough to put up.

My idea is to have a large mask behind the whole of my flash site, this masks a colour image with a black & white one (nothing tricky). The image I am using is actually 5 separate images combined, and each is a pic of certain parts of the site.

I also have a very basic set of buttons along the bottom… each corresponding to each section.

All I want is to set it up so that when I mouse over the buttons, the _x of the mask moves to correspond with the correct image… really very basic… or so I thought :slight_smile:

If anything it should be easier to do than what is in Inigo’s tut (where he uses the _x of the mouse to move the mask)… i just cant seem to get it to work with a nice easing effect (its easy to get the mask to simply snap to each coordinate, but I need it to smoothly move).

Any help on this is greatly appreciated… im more of an ASPer than an Actionscipter :-\

Thx

Ok, never mind, I was being very stupid… got it working no problems.

I now have another question. I have made a draggable movie clip (set up to mimic a window) and within it I have a close button. When hit the close button simply sends the window movie clip to frame 1… which is blank. When the button used to bring the window up again is selected it brings it up in the same place.

I was wondering if anyone could help me with the actionscript to reset the position of the movie clip to the centre of the screen once the close button has been pressed.

Thx in advance for any help on this

You shouldn’t send it to the blank frame. Instead do:

[AS]
on (release) {
MC._visible = false
MC._x = Stage.width/2
MC._y = Stage.height/2
}
[/AS]

Havn’t tested it but it should work…?? replace MC with the instance name of the whole window thing btw.

thanks mate, ill give it a whirl

hehe, i actually had that but it wasnt working… i put it after one of the fadeout functions I had… all I had to do was move it up a bit :slight_smile:
thanks anyways tho