PDA

View Full Version : Can I launch a pdf from within FlashMX


Sach
04-05-2002, 07:35 AM
Is there any way that one can launch a .pdf file from within FlashMX? I know that this can be done in Director, but would prefer to keep Flash as the shell of my movie.

Madokan
04-07-2002, 10:35 AM
Nope !

yours
Matze K.

xzone9
04-08-2002, 09:38 PM
I call up PDF, DOC, and even PPT's all the time from Flash. I use Javascript in an HTML to accomplish.

---from Flash use--

on (release) {
getURL("javascript:popUp1()");
}

--- inside HTML use---

<script language="JavaScript">
<!---

window.onerror=null;
window.defaultStatus = '';
<!--
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
//-->
function popUp1() {
newWindow = window.open("doc/yourDocument.pdf");
};
//------>
</script>

.................................................. .....
("doc/" is the directory PDF is in, and "yourDocument" replace with the actual name of your own PDF.

This works online and offline, either way.

You mention Flash MX... but I am assuming the viewer is using Flash 6 player to retrieve ths PDF. Flash MX is the authoring tool where Flash 6 is the player.

SpiderJerusalem
04-09-2002, 09:49 PM
I struggled with the trusty old FSCommand in MX. If you build a FSCommand folder, store the app.exe in the folder, the app will launch. Unfortuanatly, no combination I've found of the 'exec' command and a string to target a file works anymore, (i.e., ........"exec", "app.exe" "test.doc"); and so on....) so I did it the old fashined way, use the web browser! So, the simple answer is this:

on (release) {
getURL("Test1.pdf", "_blank");
}

which will launch a .pdf, (not .doc or any MIME types outside of the browser defaults), in the web browser. Hope that helps, I do a lot of CD's so if I find a better way I'll post it.