I amnew to as 3.0.This is the code am using to create a mp3 player,everything is fine but the volume controls,not able to mute or increase the volume,kindly tell whats wrong in the code
[COLOR=Blue]import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
import flash.media.SoundMixer;
import flash.net.URLRequest;
var soundRequest:URLRequest=new URLRequest(“Ennamo Aedho.mp3”);
var sound:Sound=new Sound();
var sc:SoundChannel = new SoundChannel();
var st:SoundTransform=new SoundTransform(0.1);
var lastPosition:Number=0;
sound.load(soundRequest);
sound.addEventListener(Event.ID3, id3Loaded);
btn_play.addEventListener(MouseEvent.CLICK, playfunc);
btn_stop.addEventListener(MouseEvent.CLICK, stopfunc);
btn_volup.addEventListener(MouseEvent.CLICK, increasevol);
btn_pause.addEventListener(MouseEvent.CLICK, onClickPause);
btn_mute.addEventListener(MouseEvent.CLICK, mute);
function playfunc( event:MouseEvent):void {
sc=sound.play(lastPosition);
}
function mute( event:MouseEvent):void {
sc.soundTransform=st;
st.volume=0.1;
}
function stopfunc( event:MouseEvent):void {
sc.stop();
lastPosition=0;
}
function increasevol ( event:MouseEvent):void
{
st.volume -= 0.1;
sc.soundTransform = st;
}
function onClickPause(e:MouseEvent):void {
lastPosition=sc.position;
sc.stop();
}
function id3Loaded(event:Event):void {
album.text=sound.id3.album;
song.text=sound.id3.songName;
artist.text=sound.id3.year;
}[/COLOR]