Rollover
Code Actionscript 2.0
Instance action
on (rollOver) {
_xscale = 120;
_yscale = 120;
}
on (rollOut) {
_xscale = 100;
_yscale = 100;
}
Code Actionscript 3.0
square.addEventListener(MouseEvent.MOUSE_OVER, rollOver); square.addEventListener(MouseEvent.MOUSE_OUT, rollOut); function rollOver(e:MouseEvent) { square.scaleX = 1.2; square.scaleY = 1.2; } function rollOut(e:MouseEvent) { square.scaleX = 1; square.scaleY = 1; }
Description
When the mouse rolls over the square, the square will expand to 120% of its size. Once the mouse rolls out, the square is reset to its original size.
Download
Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File