sanlegas Posted October 31, 2018 Share Posted October 31, 2018 Hi everyone, i hope you can help me with this problem, i'm triying to load an image in SceneB that i have already loaded in SceneA but at the moment i want to use in SceneB this doesn't show in SceneB only displays a small green box. Example: class SceneA extends Phaser.Scene{ constructor(){ super({key:'loader',activated:true}); } preload () { this.load.image('fondo', 'assets/sky.jpg'); this.scene.start("menu"); } } class SceneB extends Phaser.Scene{ constructor(){ super({key:'menu',activated:false}); } create(){ var cielo = this.add.sprite(0 , 0, 'fondo'); } preload () { console.log("menu.js preload"); } } thanks for reading!. Link to comment Share on other sites More sharing options...
jorbascrumps Posted October 31, 2018 Share Posted October 31, 2018 Try moving `this.scene.start("menu");` to `create` in SceneA. Link to comment Share on other sites More sharing options...
samme Posted October 31, 2018 Share Posted October 31, 2018 preload just starts the load queue, it hasn't finished by then. Link to comment Share on other sites More sharing options...
sanlegas Posted October 31, 2018 Author Share Posted October 31, 2018 thanks!, it worked!. greetings!. Link to comment Share on other sites More sharing options...
Recommended Posts