How do I assign a button to retrieve a file?

  • ninewords
  • Newbie
  • Newbie
  • ninewords
  • Posts: 9

Post 3+ Months Ago

I have looked all over but cannot find solutions to my problem:


1) How do I assign a button to retrieve a file for the user? I have six files that I want the user to download to a folder of his/her choice. I have six files (four mp3's and two text files (notepad)). The files are located in the folder where all my files/documents for my webpage is stored as I am creating it. I cannot find a solution anywhere!

2) I cannot get the "mailto:email@emailprovider.com" action to work. I have assigned it to a button and I have tried the direct URL input in properties, when highlighting a piece of text. I want Outlook to appear after clicking.


Thanks for reading/helping! :?:

  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

select the button you're working with. with the button selected open the 'actions' panel. Do not 'edit' the button. If you're seeing the button states in the timeline, you're in the wrong place. in the actions panel, the ActionScript would be...

Code: [ Select ]
on (release){
  getURL("myfile.???");
}
  1. on (release){
  2.   getURL("myfile.???");
  3. }


you can use "mailto:mailbox@thisaddy.com" in the argument of the getURL method. This will initiate the users default mail client.
  • ninewords
  • Newbie
  • Newbie
  • ninewords
  • Posts: 9

Post 3+ Months Ago

Thanks a lot!

I still have some problems however...

1) When clicking the download file button, the mp3 file just plays in a new window. I would like the user to get the option to save it to disk.

2) When typing "mailto:........" into the properties window after highlighting text, it still won't work. However, I rather use a button instead. How do I assign a "mailto:..." to a button in actionscript?

Thanks again!
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

You will need to .zip the file otherwise your browser will automatically open the file in it's default program (I wonder if Macromedia will add a Right Click/Save File As... feature in the future).

And as dM said, you add the mailto: as a getURL argument...
Code: [ Select ]
on (release){
getURL("mailto:mailbox@thisaddy.com");
}
  1. on (release){
  2. getURL("mailto:mailbox@thisaddy.com");
  3. }


These actions need to be applied directly to the button (right click on the button and open the Actions Panel).

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.