Skip to main content
Participant
April 22, 2010
Question

Trying to download .mp3 from web into Flash, am clueless.

  • April 22, 2010
  • 1 reply
  • 307 views

Okay, this is the code that I currently have. It's a small demo file right now, but in essence it's passed a URL to an online .mp3, which is then downloaded and hypothetically played. That doesn't seem to be working, as no sound is played and the id3 information comes up blank. Does anyone have any ideas? I do apologize if this seems basic, I'm relatively new at this. Thanks in advance!

stop();

var song:Sound = new Sound(new URLRequest("http://x.mp3"));

song.play();

trace(song.id3.TPE1 + " - " + song.id3.TIT2 + " on " + song.id3.TALB);

edit: Added the second end parentheses to line 2, that was a transcription mistake.

As well, I have a suspicion that the problem has to do with my host, FileFreak. If anyone could say if that's the problem, or has a recommendation for a better host for this purpose, I would appreciate it.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 22, 2010

if the sound doesn't play you probably have an incorrect/typo url.

the data won't be accessible even with a correct url unless you have cross-domain policy permission (assuming that is cross-domain).