8000 Sound volume auto change · SaffronCode/SaffronCode@8d1ebb0 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 8d1ebb0

Browse files
committed
Sound volume auto change
1 parent 9104666 commit 8d1ebb0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

appManager/mains/App.as

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@
381381
{
382382
ContentSoundManager.changeMainMusic((event as AppEventContent).pageData.musicURL,(event as AppEventContent).pageData.musicVolume);
383383
}
384+
else
385+
{
386+
ContentSoundManager.changeVolume((event as AppEventContent).pageData.musicVolume);
387+
}
384388

385389

386390
if(mainAnim == null)

contents/soundControll/ContentSoundManager.as

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ package contents.soundControll
9797
{
9898
SoundPlayer.volumeContril(currentSoundId,1);
9999
}
100+
101+
public static function changeVolume(volume:Number):void
102+
{
103+
SoundPlayer.volumeContril(currentSoundId,volume);
104+
}
100105

101106
/**This will change the current playing music ( not tested yet )*/
102107
public static function changeMainMusic(musicURL:String='',volume:Number=1):void

0 commit comments

Comments
 (0)
0