Deadpulse Posted March 27, 2017 Share Posted March 27, 2017 I'm just learning Phaser right now and i downloaded the latest version of it and i just started doing the tutorial and i got this error... i hope you can help me Link to comment Share on other sites More sharing options...
FakeWizard Posted March 27, 2017 Share Posted March 27, 2017 AFAIK Chorme has dropped support for webkitAudioContext in their latest release. So instead of that you can now use AudioContext. For more information read the changelog here. Link to comment Share on other sites More sharing options...
Deadpulse Posted March 28, 2017 Author Share Posted March 28, 2017 3 hours ago, FakeWizard said: AFAIK Chorme has dropped support for webkitAudioContext in their latest release. So instead of that you can now use AudioContext. For more information read the changelog here. oh okay, but i need to solve the other error "Cannot read property of 'uuid' of undefined". Link to comment Share on other sites More sharing options...
RubbleGames Posted March 28, 2017 Share Posted March 28, 2017 You're better off not using the min version for development, that way you can have a look at the Phaser code and get an idea what's wrong. Without seeing the relevant bit of your code I can't tell you much beyond it looks like you're trying to use something before you've defined it. Maybe someone with more experience can tell you more. Link to comment Share on other sites More sharing options...
FakeWizard Posted March 28, 2017 Share Posted March 28, 2017 oh my bad, the upper message is just a warning :] .. To identify what's causing the actual error we need to see more code, not just error message! Link to comment Share on other sites More sharing options...
Deadpulse Posted March 28, 2017 Author Share Posted March 28, 2017 oops yeah sorry, i forgot to post code this is the tutorial for the phaser, i just typed the same code but it looks like i did it wrong.. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var platforms; var player; function preload() { game.load.image('sky', 'assets/sky.png'); game.load.image('ground', 'assets/platform.png'); game.load.image('star', 'assets/star.png'); game.load.spritesheet('dude', 'assets/dude.png'); } function create() { game.physics.startSystem(Phaser.Physics.ARCADE); game.add.sprite(0, 0, 'sky'); platforms = game.add.group(); platforms.enableBody = true; var ground = platforms.create(0, game.world.height - 64, 'ground'); ground.scale.setTo(2, 2); ground.body.immovable = true; var ledge = platforms.create(400, 400, 'ground'); ledge.body.immovable = true; ledge = platforms.create(-150, 250, 'ground'); ledge.body.immovable = true; player = game.add.sprite(32, game.world.height - 150, 'dude'); game.physics.arcade.enable(player); player.body.bounce.y = 0.2; player.body.gravity.y = 300; player.body.collideWorldBounds = true; player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('right', [5, 6, 7, 8], 10, true); } function update() { game.physics.arcade.collide(player, platforms); } Link to comment Share on other sites More sharing options...
RubbleGames Posted March 28, 2017 Share Posted March 28, 2017 You need to give the dimensions for your spritesheet so Phaser knows where the frames start and end. In this case your preload function should read: game.load.spritesheet('dude', 'assets/dude.png', 32, 48); Link to comment Share on other sites More sharing options...
rhennig Posted March 28, 2017 Share Posted March 28, 2017 Are you running a local web server? Link to comment Share on other sites More sharing options...
Deadpulse Posted March 29, 2017 Author Share Posted March 29, 2017 12 hours ago, rhennig said: Are you running a local web server? yes i am Link to comment Share on other sites More sharing options...
Deadpulse Posted March 29, 2017 Author Share Posted March 29, 2017 14 hours ago, RubbleGames said: You need to give the dimensions for your spritesheet so Phaser knows where the frames start and end. In this case your preload function should read: game.load.spritesheet('dude', 'assets/dude.png', 32, 48); Thanks!! that solve my problem Link to comment Share on other sites More sharing options...
Arcanorum Posted March 30, 2017 Share Posted March 30, 2017 2.0.1 isn't the latest version... Link to comment Share on other sites More sharing options...
Recommended Posts