[AS3.0] Streaming Sounds Error

Hey Everyone…

I have a little problem with AS3 at the moment… I have some code that is connecting to a radio stream and it playing the music. That much works… I also have a little dropdown box which lets the user switch the stream… Whenever I try to switch the stream, I’m getting this error…

Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
at flash.media::Sound/flash.media:Sound::_load()

Which doesn’t make much sense… this is the code throwing the error…


            private function changeStation():void
            {
                sound.close();
                sound.load(new URLRequest(cbStations.selectedItem.url));
                getStreamInfo.send({streamUrl: cbStations.selectedItem.stationid});
            }

Anyways, I have tried to modify that block of code, but I can’t seem to get anything to work…

Does anyone have any suggestions?

Thanks,

–d