-
could someone please tell me the problem with this script?
im trying to get a pop up window to work. i have the script in the actions section of my button but the darn thing does not do anything after i click it.....
here is the script:
on (release) {
getURL ("javascript:/MethRed.swf=window.open('/MethRed.html','MethRed','width=200,height=200,left =1,top=1,toolbar=No,location=No,scrollbars=No,stat us=No,resizable=No,fullscreen=No'); /MethRed.swf.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(200/2); top_point = parseInt(screen_height/2)-(200/2); setTimeout('/MethRed.swf.moveTo(left_point,top_point)',100); void(0);");
}
thanks in advance
takeover@myto.com
-
pop ups
first off, your problem could be that your script is in the button scripting. It should be on actual page itself. Also, you need to initialize the function before you create it inside the <script> tags.
Here's a sample and much easier script.
1. Inside the heading and script tags,
function openWindow(URL) {
newWindow = window.open(URL, "newWindow", "toolbar=0,location=0,directories=0,status=0,scrol lbars=0,resizable=0,width=xxx,height=xxx,left=xx,t op=xxx")
}
2. Then attach the getURL action to an instance of your button:
javascript penWindow
('http://www.URL.com')
tada.
-b
-
I think here is the problem when you define a variable like "MethRed.swf=window.open.......".
The variable name "MethRed.swf" is not accepatble as a "." comes in between.
Remove it and see.
-
ok this is my situation...
I have a button in flash that after clicking i want a new window to pop up. the new window contains the file MethRed.html which is embeded to an swf file. Now the new window will not have a menu, address, or tool bar. i want it to be a plain window with size of 200x200.
Could anyone help me with the script or direct me to a tutorial. I went to: http://www.flash-db.com/PopUp/ and got a script from there but for some reason it does not work.
Thanks.
takeover@myto.com
-
Just write
==========================
on(release){
getURL("JavaScript:window.open('http://www.theManFromIndia.com','name_your_window','heigh t=200,width=200');void(0);");
}
===========================
to your button event and watch.
Have a nice time.
-
Heh Heh
Works like a charm...Thank you sooooooo much
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
|