Jump to content

Customize the Loading bar screen


Recommended Posts

Hello guys,


is there a way to add sprite to the loading screen?


I saw that I can change the loading screen using this method:

game.Loader.inject({backgroundColor: 0xcccccc,                         initStage: function() {                                      /* BACKGROUND */                                            this.bar = new game.Graphics();                         this.bar.beginFill(0xffffff);                         this.bar.drawRect(0, 0, 260, 40);                                                  this.bar.position.x = game.system.width / 2 - (260 / 2);                         this.bar.position.y = game.system.height / 2 - (40 / 2);                                                  this.bar.scale.x = this.percent / 100;                                                  game.system.stage.addChild(this.bar);                         },                                                  onPercentChange: function() {                         this.bar.scale.x = this.percent / 100;                         }});

But I want to add a background and some sprites such as the logo.


Can you help me?


thanks a lot ^^

Link to comment
Share on other sites

I forgot to say that I tried to insert some sprites with:

                   /* BACKGROUND */                   var backgroundMenu = new game.Sprite('objects/backgrounds/bg.png');                   game.system.stage.addChild(backgroundMenu);                                      var backgroundBubbles = new game.Sprite('objects/backgrounds/bubbbles-bg.png');                   backgroundBubbles.scale.set(0.8,0.8);                   backgroundBubbles.position.y = 105;                   game.system.stage.addChild(backgroundBubbles);                   /* LOGO */                   var logo = new game.Sprite('objects/logo/title.png');                   logo.scale.set(0.8,0.8);                   logo.anchor.set(0, 0);                   logo.position.y = 20;                   game.system.stage.addChild(logo);
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...