This content has been marked as final. Show 3 replies
My As knowledge is currently fledgling in the extreme, but if your theory about how the volume is being treated is correct, could you work around it by multiplying it upward? Eg:
volFactor = _root.volumeLevel / 100
newVol = 100*volFactor
My code for this is probably wrong, but maybe you can see what I'm getting at. Tell flash to set the volume to x percentage of maximum volume, not x percentage of current volume.
Of course, if there is a way to have the routine to behave as you originally expected, then that would be the much better option. Mine's a kludge.
>> My problem is getting consistant sound across all
>> the swf files. My hub (or _root) swf file creates a
>> variable called soundLevel (which can be adjusted
>> with volume controls).. this variable is then used
>> across the board to define the level at which all
>> sound should play.
Instantiate a Sound instance without specifying a movie clip parameter
in the constructor. Doing so causes that Sound instance to govern audio for
the whole SWF, so just adjust the volume on that one.
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."
I ended up doing a fuzzy fix (or kludge as you put it)... I made all sounds in the external .swf s set at a volume of 100. Seeing as the they seemed to be working off the _root. sound volume level.
And made sure all volume adjustments then only adjusted the root sounds and bingo... job done (sort of).
I was just wondering if that is the way sound objects behave... and sound objects added to external movie clips.. will inherit the _root sound level.
Anyhoo, thanks again.