Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser Shake

Status
Not open for further replies.

banditburg

Programmer
Apr 23, 2002
17
GB
Can someone tell me how to make the browser shake using action script(fsCommands?), please?

Thanks.
 
here is the JS that can do it (coded without testing) :

function earthQuake()
{
for (var i = 40; i != 0; i--)
{
switch (i % 4)
{
case 0: self.moveBy(0, 2+i); break;
case 1: self.moveBy(0, -2-i); break;
case 2: self.moveBy(-2-i, 0); break;
case 3: self.moveBy(2+i, 0); break;
}
}
}

Now you can simply ask someone to help you with the details of the fscommand.

You could use getUrl("javascript:earthQuake();") I think that will work but I am no pro in Flash. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top