| wlutes 2006-04-04, 10:31 pm |
| I used to be able to do this very easily in earlier versions of Flash but since
the MX series (and beyond wtih v8) I am only able to do it the following way:
Put the file on your webserver in a folder called: 'pdf' (sans quotes) and
have it at the same level as your .swf and html files in your directory
structure.
Within your flash movie you can use either a button, movie clip or text link.
There are two ways to put the file link in your flash movie (if text then use
the link field found in the properties panel; if a button/movie clip then use
the getURL method and select '_blank' for a window by using the Actionscript
'script assisted' panel). In BOTH cases use the full URL address like:
http://www.domain.com/pdf/filename.pdf (as an example)
The file will display in the "blank" browser window you defined in the getURL
Actionscript window. The end user can then decide to "save" the file or print
and close it or whatever.
Like I said, in earlier versions I used to be able to make a "relative URL" to
get the file in question and either display it in a window for the end user or
to download/run it. That way it didn't really matter if I moved the website to
another provider because the file was referenced locally within the same web
directory. Using the way I described above has the draw back that it is an
absolute reference to a URL so if you switch domains or providers, etc
(depending on your setup) then the link can be broken because it is absolute. I
have posted a 'getURL' question to find out how to do the relative getURL call
like before but so far there have been no takers on answering it. Will let you
know what I find out if someone does respond.
Best of luck!
|