-
Trigger Javascript
I have created a movie clip that, upon completion, I want to shake the browser window using the following javascript that I've embedded in my HTML ...
function shake_xy(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(i,0);
self.moveBy(-i,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(0,-i);
}
}
}
}
//-->
What would I write in my actionscript to make this happen? I've tried getURL("javascript:shake_xy(10)"), but that didn't work.
Thanks in advance -
Last edited by sleepydad; 12-05-2006 at 01:35 AM.
Reason: didn't enter value for x,y
-
Local browsing
I faced with some similiar problem. Calling javascript with geturl worked only when I access to the page from "http://?/xxx.html" like url. It doesn't work when I access to html from url like "file://?/xxx.html"
With my best wishes...
Gokcer Gokdal
Probase Inf. Tech.
http://www.probase.com.tr
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|