Jump to content

Why can't bitmapData load correctly the first time?


thefootballguy
 Share

Recommended Posts

I am a beginner at phaser trying to create a game that all of the sprites will be generated through bitmapdata. However, I always have to refresh browser twice to see the sprites.

Like in the phaser example on generating a sprite:

http://phaser.io/examples/v2/create/generate-sprite

You won't see the sprite till you refresh.

My questions are the following friends:

What needs to be done to have all the bmd sprites generated the first load? (Will I have to create a loader, do something with cache?)

If developing a multiplayer game with bmd sprites will some problem persist?

Thank you for your time and I hope you can help me wrestle with understanding phaser.

Link to comment
Share on other sites

Same problem here. Ubuntu / Firefox needs a refresh...

Only warnings (and they also show up on refresh):

Strict-Transport-Security: The site specified a header that could not be parsed successfully.[Learn More] iframe
"Phaser v2.5.0 | Pixi.js v2.2.9 | Canvas | WebAudio | http://phaser.io" phaser.2.5.0.min.js:12:2308
GET http://disqus.com/embed/comments/ [HTTP/1.1 304 Not Modified 272ms]

Prefixed Fullscreen API is deprecated. Please use unprefixed API for fullscreen. For more help https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API phaser.2.5.0.min.js:22:4131
'mozHidden' and 'mozVisibilityState' are deprecated.  Please use the unprefixed 'hidden' and 'visibilityState' instead. phaser.2.5.0.min.js:11:9795

Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. jquery-2.0.3.min.js:5:12747

Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More] (unknown)
Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.[Learn More] (unknown)
 

Link to comment
Share on other sites

  • 5 months later...
 Share

  • Recently Browsing   0 members

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