# How to keep playing the same music when changing the scenes?

**URL:** <https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185>\
**Category:** Phaser 3\
**Created:** [August 28, 2021, 10:02pm UTC](https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185 "2021-08-28T22:02:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tautologias345](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tautologias345](https://phaser.discourse.group/u/tautologias345)\
**Post date:** [August 28, 2021, 10:02pm UTC](https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185/1 "2021-08-28T22:02:29Z")

</div>

I do:

```javascript
class Scene1 extends Phaser.Scene{

constructor(){
super('Scene1');
}

preload(){
this.load.audio('game_music', 'path/filename.wav');
}

create(){
this.gameMusic = this.sound.add('game_music', {
						volume: 1.0,
						loop: true
					});
}
}

class Scene2 extends Phaser.Scene{

constructor(){
super('Scene2');
}

preload(){
this.load.audio('game_music', 'path/filename.wav');
}

create(){
this.gameMusic = this.sound.add('game_music', {
						volume: 1.0,
						loop: true
					});
}
}

```

When I do:

```javascript
this.scene.start('Scene2');
this.scene.stop('Scene1');

```

The music plays again from beginning and doesn’t keep from the current point. I haven’t tested this, I’m just think that is this.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [August 28, 2021, 11:31pm UTC](https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185/2 "2021-08-28T23:31:32Z")

</div>

You should load, add, and play the sound only once.

---

<div class="post-metadata">

**Author:** ![tautologias345](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tautologias345](https://phaser.discourse.group/u/tautologias345)\
**Post date:** [August 29, 2021, 12:15am UTC](https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185/3 "2021-08-29T00:15:06Z")

</div>

I don’t want the music to play again from beginning when changing the scenes. I want the music to keep playing from the current point when changing the scenes. @samme your answer that you gave me, is it your answer yet?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [August 29, 2021, 2:20am UTC](https://phaser.discourse.group/t/how-to-keep-playing-the-same-music-when-changing-the-scenes/10185/4 "2021-08-29T02:20:21Z")

</div>

Nothing will happen when you change scenes. The music will just keep playing.
