Quick question.
Are you able under AS3 to browse and select a file on a persons computer, say an mp3 file and play it?
Perhaps using the FileReference class?
ty
Printable View
Quick question.
Are you able under AS3 to browse and select a file on a persons computer, say an mp3 file and play it?
Perhaps using the FileReference class?
ty
You can do that in AS2, by simply uploading it to the server and then playing it.
I dont want to upload it to a server. I would much prefer if a user can select a song off of there hard disk. The swf will play it from there.
Flash is pretty strict on security, I don't think you will see that anytime soon. However, the end user can't tell the difference if you just upload it an then delete them after a while, only problem would be if you don't have alot of hosting space.
They will notice if they're on a slow connection. Plus it's not only hosting space, it's also bandwidth, and not only yours but also the user's bandwidth.Quote:
However, the end user can't tell the difference if you just upload it an then delete them after a while, only problem would be if you don't have alot of hosting space.
Yeah, i was hoping they might of lightened up a little. I'll have a go at home. Maybe I can figure out a way to find out the location of the file.Quote:
Originally Posted by jason merchant
Yep thats why I do not want to use that solution.Quote:
Originally Posted by Fall_X
Well, the only property that might give you any kind of indication is FileReference.name - but I doubt it will give you a full path. Haven't tried it yet though, so let us know how it works out.
Yeah from what I read, FileReference.name can only give you the name of the file, and not the file path. But I will try it out, and I'll give you a bell on progress.
Quoting the docs:
"The FileReference API does not allow you to read from or write to the transferred file and does not allow the SWF file that initiated the upload or download to access the uploaded or downloaded file or the file's location on the user's disk."
I see. Thanks tonypa.
Moved to AS3 forum.
Yeah. it's annoying. AND you'll discover a host of annoyances with the FileReference Class.
If you start using it and run into problems Yahoo Groups has a great Flexcoders forum (AS 3.0) that talks about all the issues with this Class.