createSprite is not defined

I have a student that has a game that he would like to run outside of He has put all of his code in an index.html file so that he can run it on Visual Studio. The problem he is having is that when he goes to run it he gets an error code that says “createSprite is not defined.” He is running it on Live Server extenstion. for Visual Studio. After he gets the createSprite is not defined, the next line says: “Failed to load resources the server responded with a status of 404 not found.”

The question is is how can he get code to run outside of He wants to begin creating things outside and wants to know how to run the code/program. How can he do that?

Here is what he is trying to run:
var snowman = createSprite(300,300);


function draw() {


if (keyDown(“a”)) {


snowman.x = snowman.x - 5;


if (keyDown(“d”)) {


snowman.x = snowman.x + 5;


if (keyDown(“space”))

snowman.rotation = randomNumber(10,360)



You can create the game on game lab, then use an embed to put it in an <iframe>. However there is something called an embed:

I think this is a similar question.

Hi @hensleyn,

This is another nice post about running Game Lab outside of I attached a screenshot of where you can find the export feature (located in the SHARE dialog box) so that all the sprite libraries/assets are exported and imported into other tool.
Migrating Game Lab Code off With

Hope it is helpful!