P@M@K Posted December 21, 2020 Share Posted December 21, 2020 I am trying to load a sprite sheet into the game and animate, but I keep getting the Error: "Uncaught TypeError: Cannot read property 'frame' of undefined". this.anims.create({ key: "animate"+faculty[f], frames: this.anims.generateFrameNumbers("animal" , {starts:0, ends:5}), frameRate: 10, repeat: -1}) I see that it has something to do with the "frames" key. Looked up online but the only thing I can find is someone who accidently put the "this.anims.create()" in his preload function instead of the create function. That is not my issue. Please some HELP! (been stuck on this for hours) this is the preload for the spritesheet: (it has a total of 5 frames. dimensions: height= 16, width=80) this.load.spritesheet("animal", "animal_image.png", { frameWidth: 16, frameHeight: 16 }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.