Skip to content

Commit 3fb0f7c

Browse files
committed
Swapped to new event handler
1 parent 9495b92 commit 3fb0f7c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/fbinstant/src/FacebookInstantGamesPlugin.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ var Purchase = require('./Purchase');
2828
* If this is unavailable please check to make sure you're using a build of Phaser that has
2929
* this plugin within it. You can quickly check this by looking at the dev tools console
3030
* header - the Phaser version number will have `-FB` after it if this plugin is loaded.
31+
*
32+
* If you are building your own version of Phaser then use this Webpack DefinePlugin flag:
33+
*
34+
* `"typeof PLUGIN_FBINSTANT": JSON.stringify(true)`
3135
*
3236
* You will find that every Instant Games API method has a mapping in this plugin.
3337
* For a full list please consult either the plugin documentation, or the 6.2 SDK documentation
@@ -683,7 +687,7 @@ var FacebookInstantGamesPlugin = new Class({
683687

684688
scene.load.image(key, this.playerPhotoURL);
685689

686-
scene.load.on('complete', function ()
690+
scene.load.once('filecomplete_image_' + key, function ()
687691
{
688692
this.emit('photocomplete', key);
689693

0 commit comments

Comments
 (0)