PDA

View Full Version : How to make popup at certain location


Alek
04-04-2003, 03:54 AM
Hi everybody,
I have some question about popup window,
and more about its location, following one of the tutorials I made a popup window open
in a new browser window from within Flash movie.
Everything works very fine ,but I would like to make this new window being opened at certain
location, for exmpl. 200px left margin and 150px top margin, does somebody know how to
do such thing???
I tryed to do something with the code belowe, by simple adding the x=200, y=150 ,but it doesn't work.
Please if someone have some suggestion.
Thanks in advance

Code on the button within Flash movie looks like this:

on (release) {
getURL ("javascript:spawnWindow('testpop.htm','test','toolb ar=no,location=no,status=no,menubar=no,scrollbars= no,resizable=no,width=800,height=350');");
}


and there is some additional javascript in HTML page.

vosgien
04-04-2003, 01:22 PM
Hi,
Its been a while since I looked at pop ups, but my memory tells me that you should try opening the window in an empty mc.
Put a blank mc on the stage where you want the window to open give it an instance name ( clip will do) and amend your code thus :

on (release) {
clip.getURL ("javascript:spawnWindow('testpop. htm','test','toolbar=no,location=no,status=no,menu bar=no,scrollbars=no,resizable=no,width=800,height
=350');");
}


Tyr that and see, hope it works

Cheers
Vosgien

Alek
04-04-2003, 02:12 PM
Thanks a lot Vosgien,

it seems like i found the way just a little bit different, but i will check how it works with empty MC.
And here is how i did it:

on (release) {
getURL ("javascript:spawnWindow('testpop. htm','test','toolbar=no,location=no,status=no,menu bar=no,scrollbars=no,resizable=no,width=800,height
=350,left=200,top=150');");
}

if somebody have the same problem, in this case window will pop
200px from the left and 150px from the top.
This one works only if you want popup from flash movie located on HTML page, anyway there is tutorial about it which explain it much better then me, just add left=XXX,top=XXX to have it at specific location.

Thanks again.


Cheers
Alek

karlzoe2
04-08-2003, 12:28 AM
on (release) {
getURL("javascript:window.open('mailinglist.htm','joinlist ', width=100, height=100)");
}


when I press the button it works partly fine .....it opens up the pop BUT my home page goes forward on it own and get this [object] instead of remaining as is...therefor I have to press the back button to get to my page again