Basically I am trying to add a background music to my site, my import to library function isnt working so i decided to find a script that accesses my sound file when the swf is loaded instead of loading it on the timeline. the code which i found plays with default 1 volume and i want it to play, say at 0.5
heres the related script(AS3), omitting the mute function snippet:
var mySO:SharedObject = SharedObject.getLocal(“riacodes_sound”);
var song:Sound = new Sound();
var channel:SoundChannel = new SoundChannel();
var songPosition : Number = 0;
song.load(new URLRequest(“sound.mp3”));
i tried fixin it myself through my twisted beginner mind and some looking about by adding;
var volumeAdjust:soundTransform = new volume();
volumeAdjust.volume = 0.5;
channel.soundTransform = volumeAdjust;