diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index ee7c9b73a..881d1d2cc 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -46,16 +46,6 @@ var RenderedTarget = function (sprite, runtime) { brightness: 0, ghost: 0 }; - - /** - * Audio player - */ - this.audioPlayer = null; - if (this.runtime) { - this.audioPlayer = this.runtime.audioEngine.createPlayer(); - this.audioPlayer.loadSounds(this.sprite.sounds); - } - }; util.inherits(RenderedTarget, Target); @@ -72,6 +62,18 @@ RenderedTarget.prototype.initDrawable = function () { 'control_start_as_clone', null, this ); } + + /** + * Audio player + */ + this.audioPlayer = null; + if (this.runtime) { + if (this.isOriginal) { + this.sprite.audioPlayer = this.runtime.audioEngine.createPlayer(); + this.sprite.audioPlayer.loadSounds(this.sprite.sounds); + } + this.audioPlayer = this.sprite.audioPlayer; + } }; /**