I have a Flash app that at one point needs to save an image as a PDF - it does this by calling a PHP script in a new window that creates the PDF. This works fine - unless you try it in IE with the Windows pop-up blocker turned on.
What happens then is that when you click the button in Flash "Save to PDF" the pop-up blocker asks if you want to allow popups for this site - click on Allow temporarily, and it refreshes the page. In my app this causes the user to lose the data they've entered, and also, it doesn't even open the popup for you - you have to got thru the app again and click on Save to PDF and then it works.
I can't show you my app, but I found this Create ZIP file demo that works in a similar way and shows the same problem:
http://www.bytearray.org/?p=105
open it up in IE, with your popup blocker activated, scroll down 'til you see Stevie Wonder, type in something in the text box, then hit Generate ZIP. Once you click "allow popups" it will refresh the page.
Is there something I can do to stop it refreshing the page?
It sounds as if IE is set to open PDFs in a new window - which would be regarded as a pop-up. (Although the ZIP example you give should also force a download)
I would go with forcing the browser to download the PDF as a file. It is very easy - see a tutorial at http://www.ryboe.com/tutorials/php-headers-force-download
It is this solution that I used (albeit in C#.net) with a Flash site that had multiple PDF downloads, most of them dynamic.
EDIT - after re-reading your problem, looks as if my solution is not a solution to that problem!
But I do not see the need to open a new window, if the flash movie calls a PHP page that forces the PDF to download, no browser window should be involved.
thanks, but it still triggers the popup blocker.
My googling tells me it's due to the use of navigateToURL, making it a Flash problem really. I've found a workaround but it insists on an opaque Flash, whereas I need a transparent one.