View Full Version : Downloading
kakraus
04-26-2006, 09:48 PM
I want to add the feature that the user could be able to download a song from within the flash website. I dont want the song to start playing but I want them to be able to download the songs so they can save them onto there computer. What code or procedure do I need to handle this for....
guiltfilter
04-27-2006, 06:32 AM
Zip your audio file and place it in the same folder as your html and flash files on the server and in your fla file place an appropriate button on the stage with an instance name (my_btn) then:
this.my_btn.onRelease = function() {
getURL("mySong.zip");
};
There are other ways using actionscript. Google it.
//
kakraus
04-27-2006, 01:39 PM
This is what it read back to me when I put this code in
**Error** Scene=Scene 1, layer=menu, frame=10:Line 1: Statement must appear within on handler
this.my_btn.onRelease = function() {
**Error** Scene=Scene 1, layer=menu, frame=10:Line 1: Statement must appear within on handler
this.my_btn.onRelease = function() {
What do I need to do now. I can't google it when I have no idea what to google
billingsgate
04-28-2006, 07:14 AM
Don't attach the code to the button. This is becoming an outdated practice.
Make a new layer on the movie's main timeline called "actions" and place the code inside a blank frame on the timeline. Then give your button an instance name (in the "Properties" panel) called "my_btn" (without quotes)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.