javascript - How to change the keys between two images in Phaser? -


i'm creating game.

there profile. user has opportunity change place of elements each other.

when user that, keys of images must changed between each other too.

and here problem: can't @ all

here code i'm trying use:

var loader = new phaser.loader(game); loader.image(draggableelement.key, 'path lying element', true); loader.image(lyingelement.key, 'path dragged element', true); loader.onloadcomplete.add(dosmthq); loader.start(); 

there error

uncaught typeerror: failed execute 'drawimage' on 'canvasrenderingcontext2d': provided value not of type '(htmlimageelement or htmlvideoelement or htmlcanvaselement or imagebitmap)'

thank in advance! appreciate =)


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -