"use strict";
cc._RF.push(module, '280c3rsZJJKnZ9RqbALVwtK', 'HelloWorld');
// Script/HelloWorld.js

'use strict';

cc.Class({
    extends: cc.Component,

    properties: {
        audio: {
            default: null,
            url: cc.AudioClip
        },
        label: {
            default: null,
            type: cc.Label
        },
        // defaults, set visually when attaching this script to the Canvas
        text: 'Hello, World!'
    },

    // use this for initialization
    onLoad: function onLoad() {
        this.current = cc.audioEngine.play(this.audio, true, 1);
        this.label.string = this.text;
    },

    // called every frame
    update: function update(dt) {},

    onSliderChange: function onSliderChange(newVolume) {
        cc.audioEngine.setVolume(this.current, newVolume.progress);
    }
});

cc._RF.pop();