Kozelek

Members
  • Content count

    1
  • Joined

  • Last visited

  1. Hello: First of all, I am glad to have discovered Phaser, and to be part of this community Phaser is a phenomenal library, and I think I am going to have a great time working with it. I am currently programming the initial screen of a game. I wanted to make a wobbly title (I am using a rope for it) with falling silhouettes behind it and a moving background. The code I am using is this: fondointro = game.add.tileSprite(0, 0, game.world.width, game.world.height, 'bgintro'); fondointro.fixedToCamera = true; var turistasintroTotal = 50; for (var i = 0; i < turistasintroTotal; i++) { var s = game.add.sprite(game.world.randomX, -200, 'Tourist'+Math.floor((Math.random()*7) + 1)); game.physics.arcade.enable(s); s.body.velocity.y = Math.floor((Math.random()*500) + 100); s.body.angularVelocity = Math.floor((Math.random()*110) - 50); s.tint = 0xFFFFFF * Math.random(); s.alpha = 0.5 s.autoCull = true; s.checkWorldBounds = true; s.events.onOutOfBounds.add(resetSprite, this); } var count = 0; var length = 918 / 20; var points = []; for (var i = 0; i < 20; i++) { points.push(new Phaser.Point(i * length, 0)); } ropeTitle = game.add.rope(2000, this.game.world.centerY, 'title', null, points); ropeTitle.scale.set(0.8); ropeTitle.updateAnimation = function() { count += 0.1; for (var i = 0; i < this.points.length; i++) { this.points[i].y = Math.sin(i * 0.5 + count) * 20; } };Strange thing: When I try it in Firefox it works like a charm, but when I try it in Chrome, the title appears with an alpha of 50% - even if I didn't specify that. Why does this happen?