diff --git a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js index c8ab968f48..d7a65c13b3 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js @@ -1177,15 +1177,13 @@ */ parser.initSimpleAudio = function(json, resourcePath){ + var node = new ccs.ComAudio(); var loop = json["Loop"] || false; - var volume = json["Volume"] || 0; - cc.audioEngine.setMusicVolume(volume); - //var name = json["Name"]; - + //var volume = json["Volume"] || 0; + //cc.audioEngine.setMusicVolume(volume); + node.setLoop(loop); loadTexture(json["FileData"], resourcePath, function(path, type){ - cc.loader.load(path, function(){ - cc.audioEngine.playMusic(path, loop); - }); + node.setFile(path); }); };