Copy the script from here and then paste it in to the head of the HTML document that contains your Flash movie.
<script type="text/javascript">
<!--
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
}
}
}
}
// -->
</script>
To create the flash movie,
1. Open a new flash movie.
2. Create a button in flash, right click on it, and insert the actions below:
on (press)
{
getURL ("javascript:shake(5)");
}