Add Sprite from Source Editor

To add a sprite from the source editor and not by using the stamp tool, you must first upload the asset:


Then go to the source editor and, in the create method, add this:

this.chest = (0,0, '/chest.png'); //1st & 2nd parameters are the coordinates (x,y), 3rd is the key

Full sample available here.

Leave a Reply

Your email address will not be published. Required fields are marked *