header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
MissNatti
Points:0
Posts:0

2/6/2011 1:31:29 AM

Title: Load PDF from Local PC


In Flash CS5 (as3)
I have been using the code below to load a pdf, on button click. I want this to open in its own window. The only code I can find is:



certificate_btn.addEventListener(MouseEvent.CLICK, certificate);
function certificate(event:MouseEvent):void
{
navigateToURL(new URLRequest("certificate.pdf,html"));
} 

It opens up a URL, but does not display the pdf. Instead of 'navigateToURL' is there another code that will load of local pc's? I read something that said to import the pdf, but it comes up with an error and can not read the file.



1
Evan
Points: 0
Posts:0
2/6/2011 6:48:12 AM



the above code is only useful to load files from a url or file residing on a server. There is no way to load local files of an system in flash. The above code will only load file if it resides in the same directory from where swf is loaded .

i.e abc.com/myswfFile.swf
abc.com/certificate.pdf

2
Otis
Points: 0
Posts:0
2/6/2011 10:33:50 AM



you cannot access the local files from with in flash file (swf) You can just browse the files and upload to server


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+6 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions