|
|
Question : How Do You Force a .doc Link to Open Up in Word not a Browser in Flash
|
|
I am using the getURL in Flash to open up a word document in a separate window. How do you force it to open up in Microsoft Word not Internet Explorer. What code can I put in the "GetURL" actionscript to do this?
|
Answer : How Do You Force a .doc Link to Open Up in Word not a Browser in Flash
|
|
Yes it worked.
I start my browser then i go to this url http://localhost/myswf.swf and shows up a movie with a button, when pressed prompts the dialog asking to open or save.
Using iexplorer as the web browser.
// The code i used on my ASP file
<% Dim objStream, myContents, myFileName
myFileName = "XmlNotepad.doc"
Response.ContentType = "application/octet-stream" Response.AddHeader "content-disposition", "attachment; filename=" & myFileName
Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open objStream.LoadFromFile Server.MapPath(myFileName)
myContents = objStream.ReadText
Response.BinaryWrite myContents
objStream.Close Set objStream = Nothing %>
// The code used on my fla.
on (press) { getURL("XmlNotepad.asp"); }
|
|
|
|