I have Flash game at my site. There is a button “Download full version” that calls Javascript function:
function download() {
window.open('http://mysite.com/goto/game1');
}
- http://mysite.com/goto/game1
redirects via 301 redirect in .htaccess to - http://mystatisticsite.com/goto/mysite/game1
redirects via PHP header(‘Location: ‘.$downloadUrl); to - http://gamesite.com/downloadgame?id=mysite
redirects to - http://gamesite.com/game.exe
And here new opened IE window just closes (getting to the last URL, not in the middle of redirects).
I have added HTML-link http://mysite.com/goto/game1 and Javascript-link with onclick=”download()” at the same page. Both are working great, only link from Flash game crashes IE.
I have tried to call download() from “IE Developer Tools” -> Script -> Run script, it crashes IE too.
Suppose that it might be some strange security IE thing but it doesn’t show “Are you sure?” but just closes the new window.
Firefox & Chrome download game without any problems.
One of my smart colleagues has found the answer.
The problem was in Internet Explorer who didn’t get any relationship from click in Flash and downloaded file because Flash was not in transparent mode so it wasn’t connected for IE with the page.
But my Flash movie crashed when I added transparent mode manually.
The problem was fixed using SWFObject with transparency: