1.添加热点声音;
soundhelper.xml;
if(sound_settings.bgsound == true,
preloadsound(get(sound_settings.bgsoundurl));
);
if(sound_settings.bgsound == true,
playsound(bgsnd, get(sound_settings.bgsoundurl), get(bgsoundloop));set(sound_settings.mute,false);
);
if(sound_settings.mute,
if(scenesound[get(xml.scene)].scenemusic != null AND scenesound[get(xml.scene)].scenemusic !== null,
if(sound_settings.musicchange == 1,
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic),get(scenesound[get(xml.scene)].loop));
);
if(sound_settings.musicchange == 2,
if(scenesound[get(xml.scene)].scenemusic2 === null OR
scenesound[get(xml.scene)].scenemusic2 == '',
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic),get(scenesound[get(xml.scene)].loop));
,
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic2),get(scenesound[get(xml.scene)].loop));
);
);
set(sound_settings.mute,false);
);
if(sound_settings.bgsound == true,
playsound(bgsnd, get(sound_settings.bgsoundurl), get(bgsoundloop));set(sound_settings.mute,false);
);
,
if(sound_settings.now_play != '',
callwith(hotspot[get(sound_settings.now_play)],onclick);set(sound_settings.mute,true);
);
if(scenesound[get(xml.scene)].scenemusic != null,
stopsound(bgs);set(sound_settings.mute,true);
);
if(sound_settings.bgsound == true,
stopsound(bgsnd);set(sound_settings.mute,true);
);
);
if(sound_settings.mute,null
,
if(sound_settings.musicchange == 1,
stopsound(bgs);
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic2),get(scenesound[get(xml.scene)].loop));
,
stopsound(bgs);
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic),get(scenesound[get(xml.scene)].loop));
);
);
switch(sound_settings.musicchange,1,2);
if(scenesound[get(xml.scene)] !== null,
if(scenesound[get(xml.scene)].scenemusic === null,
set(scenesound[get(xml.scene)].scenemusic,'');
);
if(scenesound[get(xml.scene)].loop === null,set(scenesound[get(xml.scene)].loop,1));
if(scenesound[get(xml.scene)].scenemusic != '',
if(sound_settings.mutemuteglobal == false,
if(layer[get(sound_settings.musicplaybutton_name)] !== null,set(layer[get(sound_settings.musicplaybutton_name)].html,'暂停'));
);
if(sound_settings.mute == false,
if(sound_settings.musicchange == 1,
playsound(bgs,get(scenesound[get(xml.scene)].scenemusic),get(scenesound[get(xml.scene)].loop));
);
if(sound_settings.musicchange == 2,
if(scenesound[get(xml.scene)].scenemusic2 === null OR
scenesound[get(xml.scene)].scenemusic2 == '',
);
);
set(sound_settings.mute,false);
);
copy(sound_settings.musicgroup,scenesound[get(xml.scene)].scenemusic);
);
if(scenesound[get(xml.scene)].scenemusic == '',
set(sound_settings.musicgroup,0);
);
,
set(sound_settings.musicgroup,0);
);
if(layer[get(sound_settings.musicplaybutton_name)],
set(layer[get(sound_settings.musicplaybutton_name)].alpha,1);
set(layer[get(sound_settings.musicplaybutton_name)].enabled,true);
);
if(scenesound[get(xml.scene)] === null AND sound_settings.bgsound == false AND layer[get(sound_settings.musicplaybutton_name)],
set(layer[get(sound_settings.musicplaybutton_name)].alpha,0.5);
set(layer[get(sound_settings.musicplaybutton_name)].enabled,false);
);
if(scenesound[get(xml.scene)] !== null AND (scenesound[get(xml.scene)].scenemusic == '' OR scenesound[get(xml.scene)].scenemusic === null ) AND sound_settings.bgsound == false AND layer[get(sound_settings.musicplaybutton_name)],
set(layer[get(sound_settings.musicplaybutton_name)].alpha,0.5);
set(layer[get(sound_settings.musicplaybutton_name)].enabled,false);
);
if(scenesound[get(xml.scene)].scenemusic2 != '' AND layer[get(sound_settings.musicchangebutton_name)] ,
set(layer[get(sound_settings.musicchangebutton_name)].alpha,1);
set(layer[get(sound_settings.musicchangebutton_name)].enabled,true);
);
if((scenesound[get(xml.scene)].scenemusic2 == '' OR scenesound[get(xml.scene)].scenemusic2 === null) AND
layer[get(sound_settings.musicchangebutton_name)] ,
set(layer[get(sound_settings.musicchangebutton_name)].alpha,0.5);
set(layer[get(sound_settings.musicchangebutton_name)].enabled,false);
);