Shake Browser

Hey I want to know how to make the browser shake?
I know it’s something like shakexy…but I don’t get it.
Can someone tell me exactly how to do this??
I have made a movie and want on some particular frames the browser to shake.
Help :-<
Thnx

It is much more difficult then just shake(x,y).

I am sure you can find a script for it at www.dynamicdrive.com or www.javascriptkit.com or www.a1javascripts.com

I am really pressed for time and I can’t type one up right now.

Also, I believe www.flashkit.com has a tutorial on it, not sure though.

Put this code on ur HTML:


function terremoto(x) { 
	brie4 = (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4); 
	if (brie4) { 
		for (i = 5; i > 0; i--) { 
			for (j = x; j > 0; j--) { 
				self.moveBy(0,i); 
				self.moveBy(i,0); 
				self.moveBy(0,-i); 
				self.moveBy(-i,0); 
			} 
		} 
	} 
}

and on ur flash button:

myButton.onRelease = function(){
getURL("java script:terremoto(4);")
}

Hope this helps!

yours,
h88

Hey lost,

why dont u move this thread to serverside/scripting forum?

Yeah I should, I am moving it now…

I neglected to check the section it was in so I didn’t realize it was in MX.

All the tutorials I’ve seen on the recommended sites reference a script that has the viewer cliking a button before the browser will shake. I’m looking for a script that does exactly what Condor182 was referencing—having the browser shake at a certain frame in the movie. Any helpp would be appreciated.

did’nt u c the script above?

This script requires the user to depress a button; is there a script that would shake the browser at a certain point in the timeline in the SWiSH movie?

just call the script with an enter frame command

Peace

That’s a bit over my head; could you give an example of that?

Did’nt work with swish before. :-\

ahhhh… totally missed the fact that he was trying with Swish…hmmm sorry buddy.

Peace

if you wanna do it with flash I’d gladly help you out.

Peace

I just got it to work using Swish, but it will only work when you export to HTML, then you have to FTP the .swf and .html files to your server. I’d like to know if it can work in Flash; that is, would the Javascript work in the Flash player window?

No, the javascript calls upon a function that the browser itself interprets.

So using this code in the stand alone player will not work.

*Originally posted by lostinbeta *
**No, the javascript calls upon a function that the browser itself interprets.

So using this code in the stand alone player will not work. **
… exactly

Plus your not shaking the flash movie - really youre shaking the browser window… so as lost said - se la vi - you just gotta upload it…

Peace<:}