1

I've purchased a Flash website for my radio station www.SSSVibez.com. The flash website has an mp3 playing in the background when you open it. The code looks as such:

var mysound = new Sound();

_root.mysound.onLoad = function (loadedOK)

 { if(loadedOK)

 {_root.mysound.start(0,9999);}

}
_root.mysound.loadSound("music.mp3", false); 

Which works fine but I want my radio stream to play instead of an MP3 file and I don't know how to go about it (it's been a while since I used Actionscript. Note it's built on Actionscript 2.0.

Brad
  • 159,648
  • 54
  • 349
  • 530
Dj Tech
  • 11
  • 2
  • you need to play RTMP stream in flash, which is possible, check this: https://stackoverflow.com/questions/15967523/how-can-i-play-a-rtmp-video-through-netconnection-and-netstream – Vipul Sep 11 '18 at 10:37
  • This Template is Actionscript 2.0 and example is 3.0 i only need audio so is it still videoURL? – Dj Tech Sep 11 '18 at 15:24

1 Answers1

0

I've purchased a Flash website for my radio station

I hate to tell you this, but Flash is disappearing rapidly. If you can get your money back, I'd recommend doing so.

This Template is Actionscript 2.0

In ActionScript 2.0, it isn't possible to have an HTTP stream without a memory leak of sorts. Listeners that tune-in for more than a few hours are likely to run into this.

I want my radio stream to play instead of an MP3 file

Simply put in the URL of the stream instead of the URL of the MP3 file.

If you're playing a stream from a SHOUTcast server, you'll need to use a semicolon ; at the end of the URL. For example, if your server is running at http://stream.example.com:8000/, use the stream URL http://stream.example.com:8000/;. This gets around a quirk of SHOUTcast servers where they return the admin page rather than the stream URL for user agents containing "Mozilla". Other servers don't suffer from this problem.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • Thank you for your Response unfortunately Simply putting in the URL of the stream instead of the URL of the MP3 file this MP3 is held local no URL . ive tried the semi colon also – Dj Tech Sep 13 '18 at 00:00
  • @DjTech What's the URL of your stream? – Brad Sep 13 '18 at 00:32
  • @DjTech Alright, if you use `_root.mysound.loadSound("http://198.50.158.92:8888/;", true)`, it should work just fine. Don't forget to use `true` for streaming mode. – Brad Sep 13 '18 at 02:29