dontPreloadImage

Game development with Board Game Arena Studio
Post Reply
User avatar
galehar
Posts: 136
Joined: 29 March 2015, 00:12

dontPreloadImage

Post by galehar »

Hello,

I have some graphics which are specific to an extension. So I'd like to use dontPreloadImage to avoid loading it if the extension isn't used. However, I'm not sure how it works. The doc only says to do

Code: Select all

this.dontPreloadImage( 'cards.png' );
But where to put this? In the js constructor? And how does the loading occurs, is it automatic whenever the image is displayed? How do I test that the image isn't preloaded?

Thanks.
User avatar
Victoria_La
Posts: 620
Joined: 28 December 2015, 20:55

Re: dontPreloadImage

Post by Victoria_La »

Yes its in the constructor. I don't know how to test it, maybe it will be loaded faster
User avatar
Morgalad
Posts: 108
Joined: 17 January 2017, 20:46
Contact:

Re: dontPreloadImage

Post by Morgalad »

The network debug in chrome or FF would show you all the REST calls for GET, chek what your browser is requesting:

Image
Cheers...
Morgalad

Developer of: Incan Gold , Takara Island , Taluva and Veggie Garden
Post Reply

Return to “Developers”