View Full Version : Shake Browser
Condor182
November 15th, 2002, 06:44 PM
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
lostinbeta
November 15th, 2002, 07:11 PM
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.
h88
November 16th, 2002, 02:13 AM
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
h88
November 16th, 2002, 02:39 AM
Hey lost,
why dont u move this thread to serverside/scripting forum?
lostinbeta
November 16th, 2002, 02:50 AM
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.
boi1der
December 11th, 2002, 06:04 PM
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.
h88
December 12th, 2002, 08:15 AM
did'nt u c the script above?
boi1der
December 13th, 2002, 01:30 AM
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?
Ryall
December 13th, 2002, 01:45 AM
just call the script with an enter frame command
Peace
boi1der
December 13th, 2002, 10:40 AM
That's a bit over my head; could you give an example of that?
h88
December 13th, 2002, 01:40 PM
Did'nt work with swish before. :-\
Ryall
December 13th, 2002, 03:02 PM
ahhhh... totally missed the fact that he was trying with Swish...hmmm sorry buddy.
Peace
Ryall
December 14th, 2002, 02:10 AM
if you wanna do it with flash I'd gladly help you out.
Peace
boi1der
December 16th, 2002, 05:53 PM
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?
lostinbeta
December 16th, 2002, 05:54 PM
No, the javascript calls upon a function that the browser itself interprets.
So using this code in the stand alone player will not work.
Ryall
December 16th, 2002, 06:29 PM
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<:}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.