they both say that if u want it to work in flash, u just type this “getURL (“javascript:shake_xy(10,10);”, _self)” or something like that in u’r actions in a frame or button…it doesnt seem to work for me! i do that but the window doesnt shake…can anyone please help me! thank you all for taking u’r time to read this…if u could help me out, i’d be grateful!
I went to the first link and checked out the code. It looks good to me.
If you follow their instructions pasting the javascript to the html page that contains the movie, and using that actionscript in the Flash project it should work.
I’ve been wanting to play with that anyway. I’ll have to try it out when I get home.
Attatch this AS to your button you want to shake the screen with
getURL (“javascript:shake_xy(10,10);”, _self)
and then publish as html. Go to view and open the source then paste the JS I’ve posted into the html. Save the source with the same name and the .htm extension making sure your .swf is in the same folder.
Just in case you run into the same thing I overlooked once I thought I’d let you know that when you publish as html it will overwrite the html page if it has the same name in the same folder (that’s if you didn’t already know). Meaning if you pasted the JavaScript into the source of that html page saving it after as html. then you go back into flash and republish, it will wipe out your coding.
So attach this AS to your button:
on (release){
getURL (“javascript:shake_xy(10,10);”, _self)
}
(if you don’t make btn instances and assign AS from frames).
…then publish as html, open in the Source from the View and paste the JS in, and then save.
thanxs alot man, u really helped me out!! i got an idea, so that i put the AS in my ENTER SITE button, coz everybody has to click it, and they all get to feel the experience thanx again!!!
here’s another idea for your viewers to experience, obviously in context with a movie you may be creating (shaking the broswer is great for intros, like a rocket taking off and so on). Here goes, nice and simple:
Place this AS on a frame where you want your the browser to start shaking:
getURL ("javascript:shake_xy(10,10);", _self)
… same as above but without the button.
Also, you may already be doing this, have a play around with the broswer shaker JS. To change the effect.