jonny-o Posted October 17, 2009 Report Share Posted October 17, 2009 Hi, I am wanting to know if possible, and how to, add a link under a menu in Flash, so that when clicked on it, it open a .swf or .pdf document, forexample if you clicked on a hyperlink in a HTML website, it opens up a .pdf document. I have tried and searched for a solution online for the last 3 weeks, and is quite frankly fedup searching. I have tried creating a button and then inserting "Download PDF". I have tried to drag and drop the .swf documents, but then it is all over the place. Like I said, all I would like to do is have the name of the document, then as soon as someone clicks on it, it will either open up the swf or pdf or ask what they would liek to do. Even if I have to convert the pdf's to another format if swf is not useful, then that would so help me out heaps too. Cheers Jonny O Quote Link to comment Share on other sites More sharing options...
lm Posted October 17, 2009 Report Share Posted October 17, 2009 Like I said, all I would like to do is have the name of the document, then as soon as someone clicks on it, it will either open up the swf or pdf or ask what they would liek to do. Have you tried "Get URL" action for the button (with the full path to your .pdf or .swf file? Quote Link to comment Share on other sites More sharing options...
jonny-o Posted October 17, 2009 Author Report Share Posted October 17, 2009 Actually, I have not tried that, as I thought it only applies to external web content and not documents as such, but I surely will give it a try. Thanks so much for the suggestion, I'll let you know how I go. Cheers Quote Link to comment Share on other sites More sharing options...
jonny-o Posted November 18, 2009 Author Report Share Posted November 18, 2009 Hi, Sorry for taking so long to post a reply. I tried what you suggested above, and it works to an extend, except the button does not perform the action by opening the PDF file. It comes up with this error each time I try and publish the website. Obviously I must be missing some more commands in the Get URL action somehow: "Statement must appear within on handler" and it highlightes this part of the code "ttffpButton_btn.onRelease=function(){" Any suggestions what may be wrong there possibly? Anybody's help would be muchly appreciated. Cheers Quote Link to comment Share on other sites More sharing options...
lm Posted November 18, 2009 Report Share Posted November 18, 2009 you need to go back to basics: watch or read a tutorial on Flash buttons (google "Flash button tutorials", and not only watch but create the actual button and assign it the actions getURL. Here is just one of many tutorials. It describes very basics. But make sure that you pick tutorial for your version of Flash so it would be easy for you to see where you are making the mistake in your script. Quote Link to comment Share on other sites More sharing options...
jonny-o Posted November 19, 2009 Author Report Share Posted November 19, 2009 Ahhhhhhh I see now where I wen't wrong. I typed the standard code for Get URL instead of adding the action to the button and entering all the variables. Thanks Heaps for that - I appreciate it Fingers crossed it works this time Quote Link to comment Share on other sites More sharing options...
jonny-o Posted November 21, 2009 Author Report Share Posted November 21, 2009 Hi, Just wanted to let you know this worked perfectly fine for me. I can now open those documents & external URL's very happily - Yay!!! haha I can't believe something so small and simple was so frustrating hehe Thank You very very much for your help again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.