Requirement:
Flash MX
Step 1:
Open a new document.
In the actions for frame 1 of layer name layer 1 type:
menutriggerdist=150;
menumaxscale=300;
menumultiplier=1.5;
This control how and when the mouse interacts with button. Once you have completed all the steps, change them around and see how each one changes the effect.
Step 2:
Cntl+f8 (Insert --> New Symbol)
Click on new movie click, call it Ibutton.
In the frist frame create your image or whatever you want the mouse to interact with , to make it easy you can just type some text in the center of the frame.
Step 3:
Go back to the scene 1
Press f11(Window --> library) to bring up your library and then drag Ibutton movie clip onto your page
Step 4:
Click on Ibutton and then in the actions for Ibutton type the following:
on (press) { // Gives your movie a button functions
getUrl("http://www.astahost.com");
}
on (rollOver) {
this._alpha=100;
}
on (rollOut) {
this._alpha=25;
}
//sets event to mousemove or your button won't operate properly.
onClipEvent (mouseMove) {
//calculates distance from mouse to movie clip
dist=Math.sqrt(Math.pow(Math.abs(_xmouse),2)+Math.pow(Math.abs(_ymouse), 2));
// if within a certain distance, triggerdistance, then start changing the clips scale
if (dist<=_root.menutriggerdist) {
currscale=(1-(dist/(_root.menumultiplier*_root.menutriggerdist)))*(_root.menumaxscale-100);
this._xscale = currscale;
this._yscale = currscale;
// if outside of triggerdistance, then make the scale equal to 100
} else {
this._xscale = 100;
this._yscale = 100;
}
}
Step 5:
Test your new button

