Right, well basically my volume controller works for each frame, except it won't remeber what the volume is set at for the next frame, i've tried: playsong.setVolume(playsong.getVolume()); Anyone got any ideas on how to sort this? Thanks
there shouldn't be any need to store the volume of playsong when moving from one frame to another unless you are creating a new sound object in the next frame (with the same instance name). in that case, store the volume (before replacing the sound object) in variable.
Before you go to the next frame store the current volume ina var. then in the next frame when the loading completes(sound.onLoad) assign the previously stored volume .
got an example you could show? because all the variables i try just set the volume to 0, or full and ignore any changes.
: // just before advancing frames: playsongVol=playsong.getVolume(); // just prior to applying the start() method to your sound in the next frame use:
Hmm, is there a problem because im streaming the music externally that it won't remeber the volume. With the code you suggested earlier my code looks like this but its not working properly any suggestions? stop(); playsong = new Sound (soundLoader); // just prior to applying the start() method to your sound in the next frame use: playsong.setVolume(trackVolume); playsong.loadSound("music/track1.mp3?nocache="+new Date().getTime()+random(999999),true); playsong.onSoundComplete = function() { // just before advancing frames: trackVolume = playsong.getVolume(); nextFrame(); };
Try to follow what our good friend kglad had suggested as you are playing only one sound at a time you need not to create more than one sound object. Then test your code and tell us whether it is working fine or not. If not then also give us a detail account of the problem. Cheers.
yeah.... its called being half asleep the last couple of weeks lol, well ive condensed all my frames down into one so when one track finishes it loads the next one. Although this has given me a whole array of new problems but thanks for the wake up call.
We love problems.........they are the essence of developement....... Any time any prob just post it....... someone will definitely try to help you out...
Don't see what you're looking for? Try a search.
|