Sound Transform not working
Hey guys,
I'm getting this silly little problem. I'm making a sound play and I'm trying to change it's volume. I've done this many times before and got it to work, but in this script for some reason it's not working. The script looks like this :
package {
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
public class Main
{
var createSound:Create;
var createChannel:SoundChannel;
var createTransform:SoundTransform;
public function Main()
{
createSound = new Create();
createChannel = new SoundChannel();
createTransform = new SoundTransform();
createTransform.volume = 0.5;
createChannel.soundTransform = createTransform;
createChannel = createSound.play();
}
}
}
For some reason, it plays the sound, but at full volume no matter what value I put in the createTransform.volume variable. I've gotten almost the same exact code working in other games I've made, I dunno why it isn't working in this one
