View Full Version : how to add an html pop-up to a flash site...
saru110
09-21-2006, 03:25 PM
i have made a site using flash and i have a link to a downloadable mp3 file, however because of the flash file, of course, you cannot rt click to "save as"...therefore i need to add a small pop up html window with a simple button to the site. can anyone tell me how to add the popup window as whenever i try i get a full sized window open up.for exmaple if i want to open a 300 by 200 pixel window how do i go about it??
thanks
saru110
mrand01
09-21-2006, 03:59 PM
write a javascript function to create a new window and call that in flash using either ExternalInterface or getURL. Your problem could also be solved by writing a script in any server-side language to "send" the file to flash...you can fool the browser into thinking mp3 is an unknown mime type, and that will in turn force a save-as dialog instead of trying to open it in the browser...
saru110
09-21-2006, 04:27 PM
wow thanks...the second option sounds like the one for me...but i`m a real beginner at this stuff...how do i go about writing the server script??
thanks in advance
saru110
mrand01
09-21-2006, 04:35 PM
depends on if you have php, jsp, asp, or asp.net...its different for every language. For asp.net (what i've done)...you basically feed the file as a binary stream into the responses output stream, with a mime type of octal or something like that so the browser doesn't know what to do with it, forcing a saveas dialog..im sure you can find more info on google too, or maybe someone else here knows how w/ other languages
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.