View Full Version : POP up Window

12-04-2006, 08:30 AM
Hi Friends
I am getting problem in popup window I want to open an image, width is 500 and height is 650 but I want to show in an pop up window of 500X500 with scroll bar

I had used this script but it does not help me

on(press) {
getURL("javascript:NewWindow('FILENAME.html','','width=500 ,height=500,menubar=no,toolbar=no, scrollbars=yes,resizable=no')");

but the image doest not opens

12-04-2006, 09:07 AM
you need to call a javascript function from the flash movie

javascript function in page header...

<script language="javascript" type="text/javascript">

function popup(theURL,winName,features) {


then you action script on the button would look like ...
where 'example1.htm = your popup page

on (release){

getURL ("Javascript:popup('example1.htm','newWin','scrollba rs=yes,width=500,height=500')");


12-04-2006, 09:22 AM
actually I got 1 index file in which i had inserted 1 swf file in which this button exits, when i will click on it I want to open 1 image so the script which u mentioned to insert in html can i insert in index file

12-04-2006, 09:28 AM
the script is working but the image looks very small compare to the orignal size

12-04-2006, 09:32 AM
do you want to display the original size

If so you need to adjust your image tag accordingly

12-04-2006, 09:34 AM
if suppose I m linking directly image i.e Jpeg

12-04-2006, 09:42 AM
if you do this the there is a big chance that some visitors might have JPG's associated with photoshop or fireworks. I, for one, would not want photoshop loading just to display an image from the web

you a better off inserting your image ina page and defining the size of the image from that

the reason that your image is smaller or looks the wrong size is that your function is specifying a size of 500 x 500 so thats what your going to get

use a blank page to display you image and call the page not the image

12-04-2006, 09:47 AM
Sorry but understood please dont mind can u clarify

12-04-2006, 09:52 AM
you are currently loading a jpg. This is wrong, you should be loading a htm.

Put your image inside the htm page (popup)

12-04-2006, 10:51 AM
Yes I got it thank you very much for giving ur precious time and helping me

12-04-2006, 11:07 AM
no problem

donations of bang & oulfsen accepted