View Full Version : Excuting .PDF Files in an .SWF
Animadictsaiyuki
02-28-2008, 09:36 PM
I'm planning to have a .swf file on a cd along with an .pdf file, but what I want to do is I want to have a button in the .swf to excute the .pdf file. So far the only thing I've come across to enough was the FS command to execute an .exe file. Can anyone help me out on this? Many thanks in advance.
xxneon
02-28-2008, 09:42 PM
if you use getURL you can have the pdf open up in a browser using the adobe reader plugin.. another thing is checking into using a 3rd party projector .. like zinc to see if that has the ability to open files in their default application..
.. another thing is checking into using a 3rd party projector .. like zinc to see if that has the ability to open files in their default application..
http://www.multidmedia.com/software/zinc/
External Media Support for Video, HTML, PDF and More
With Zinc™ 3.0, your Flash Applications can host virtually any Video Format Files (AVI*, Mpeg*, QuickTime, Real*), PDF Documents and even local or online HTML Webpages. Load external media directly inside your Projector exactly where you want it. * Windows Only
CyanBlue
02-29-2008, 12:38 AM
Good to read...
http://www.kirupa.com/forum/showthread.php?t=55175
northcode
02-29-2008, 03:33 AM
You can't EXEC a PDF file, you can only EXEC files that are uhh... executable. That means .EXE, .BAT and a few other obscure formats which nobody really uses any more. The BAT file is the most interesting of those for you because it will let you open PDF files fairly simply. I've explained it all, with examples in this blog post Conquering FSCommand EXEC Part 1 : Proxy (http://www.northcode.com/blog.php/2007/08/07/Conquering-FSCommand-EXEC-Part-1-Proxy) which includes a FREE tool (Proxy) for getting rid of the ugly DOS box that appears when you try to EXEC a BAT file.
Interesting links CyanBlue & northcode, thanks for sharing!! Curious however, what about cross platform hybrid CD though, does a .BAT work on a mac?
CyanBlue
02-29-2008, 04:08 PM
Mac uses AppleScript to do the same thing as the Batch file in Windows system cuz a batch file won't work on Mac... See that thread on Kirupa... I believe that one contains some sample AppleScript... ;)
Mac uses AppleScript to do the same thing as the Batch file in Windows system cuz a batch file won't work on Mac... See that thread on Kirupa... I believe that one contains some sample AppleScript...
Whoops! (I just skimmed through that but yeah the title says applescript and so do alot of posts) very poor skim reading on my part ;-) Thanks CyanBlue! Sorry about that!
CyanBlue
03-03-2008, 01:41 PM
Hehe... No worries... I suggest you get a set of glasses... It also helps to get one more if you already have one... I already have 3 sets myself... :p
keymistress
03-10-2008, 03:15 PM
i can't remember where i got this off but here's the code
on(release) {
// code on a keyframe on the main timeline
var swfUrl:String = _root._url;
var lastSlashIndex:Number = swfUrl.lastIndexOf("/");
var pipeIndex:Number = swfUrl.indexOf("|");
var baseUrl:String;
if (pipeIndex >= 0)
{
baseUrl = swfUrl.substring(0, pipeIndex);
baseUrl += ":";
}
else
{
baseUrl = "";
}
baseUrl += swfUrl.substring(pipeIndex + 1, lastSlashIndex + 1);
var targetUrl:String = baseUrl + "YOURPDF.pdf";
getURL(targetUrl, "_blank");
}
;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.