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.

2 comments on “Add Sprite from Source Editor

  1. The post is nicely organized. I see the author has a real knack for
    this particular topic. I like that subject, and I’m in constant search of new bits and the latest
    news. I really loved that one, as it’s filled with fascinating facts and it is a sort of easygoing article.
    I spent just a few minutes reading, and due to well-structured text,
    then I know it entirely. Thanks!

Leave a Reply

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