• Content Count

  • Joined

  • Last visited

  1. jclyra

    Pause and Sound resume issue

    Hey, Appreciate your Alex reply. But something is really weird. I tested the code here at home and it works perfectly fine. Maybe this is a browser issue. I will try to compare my browser here at home and at the office.
  2. jclyra

    Pause and Sound resume issue

    Hi, I'm really new to phaser and having some issues with my game on which I created a script that when the player clicks or goes outside of the game (e.g. clicks another tab), the music should be paused and when it resumes (user clicks back in game), music should continue. The issue is that when the game continues, it music starts over the very beginning. I've followed some of the examples that I've found here but still does not work. Anyone experiencing the same thing or it's juts with my implementation? var introState = function(game){ }; introState.prototype = { preload: function(){ game.load.audio('intro', '../music/intro.mp3'); }, create: function(){ recording = game.add.audio('intro'); recording.play(); game.onPause.add(pauseMusic, this); game.onResume.add(resumeMusic, this); }, render: function(){ } } function pauseMusic() { recording.pause(); } function resumeMusic() { recording.resume(); } This is just one of a state with in my game. Any help is appreciated. Thanks
  3. Hi, I'm new to Phaser and I have some questions when using tween and fill color on which I wasn't able to find any information if it is possible. Basically, I have a straight short line (let's say 20px) which travels from the right side of the screen to the left, but when it reaches the middle part of the screen it creates a circular loop forming the letter "O" and then continues moving till it reaches the left side of the screen. What I wanted to do is when the short line loops in the middle part, the track should be filled with color and forming the letter O itself. Is this possible? I appreciate any information or anyone who can direct me to a reference on this.. Thanks