Flash Script – Shaking Window Effect

By Georgina Laidlaw

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--) {
//  -->

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)");
Meet the author
Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

No Reader comments


Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Front-end, once a week, for free.