Open GoogleCodeExporter opened 9 years ago
mp3streamplayer.soundChannel.soundTransform.volume = 0.5; // 50%
Original comment by martn.1...@googlemail.com
on 18 Jan 2010 at 4:34
This is the code I am using (to test it):
import fly.sound.*
import fly.sound.shoutcast.*
import fly.sound.events.*
var ssp:MP3StreamPlayer = new MP3StreamPlayer()
ssp.playStream("http://scfire-ntc-aa06.stream.aol.com:80/stream/1039")
ssp.soundChannel.soundTransform.volume = 0.0; // 50%
The error I receive is:
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at Untitled_fla::MainTimeline/frame1()
Original comment by steven.j...@gmail.com
on 19 Jan 2010 at 8:32
If you want to change the volume, try this:
var myPlayer:MP3StreamPlayer = new MP3StreamPlayer();;
var myChannel:SoundChannel = myPlayer.soundChannel;
var mySoundTransform:SoundTransform = myChannel.soundTransform;
mySoundTransform.volume = 0.5;
myChannel.soundTransform = mySoundTransform;
Original comment by clenn.m...@gmail.com
on 7 Apr 2010 at 10:22
It won't work. You can change wolume only after the playback is started. It
can be done with this code:
var stream:MP3StreamPlayer = new MP3StreamPlayer();
stream.addEventListener(Event.COMPLETE, completeHandler);
stream.playStream('http://stream_address/');
function completeHandler(e:Event)
{
var stream:MP3StreamPlayer = e.target;
var mySoundTransform:SoundTransform = stream.soundChannel.soundTransform;
mySoundTransform.volume = Std.parseFloat(params.volume);
stream.soundChannel.soundTransform = mySoundTransform;
}
Original comment by Jacek.Je...@gmail.com
on 28 Jun 2010 at 1:32
Original issue reported on code.google.com by
steven.j...@gmail.com
on 9 Jan 2010 at 10:26