keysabyl

Members
  • Content Count

    9
  • Joined

  • Last visited

About keysabyl

  • Rank
    Newbie
  • Birthday 01/02/1962

Profile Information

  • Gender
    Male
  • Location
    Belgium

Contact Methods

  • Twitter
    @p_keysabyl

Recent Profile Visitors

702 profile views
  1. I found the solution myself: public preload{ this.load.text('fruit', 'assets/text/fruit.txt'); } public create{ this.loadFruit(); } private loadFruit(){ let cache = this.cache.text; let myFruit = cache.get('fruit'); this.arrayFruit = myFruit.split('\n');}; console.log(this.arrayFruit[3]); // >>> lemon }
  2. For a game I would like to load a text file (ex. fruit.txt) with some words in an array in Phaser 3. How can I do this? example of fruit.txt: apple banana strawberry lemon peach pear ... array: fruit[0] = apple fruit[1] = banana fruit[2] = strawberry fruit[3] = lemon fruit[4] = peach ...
  3. Thanks for the answers, my problem is solved!
  4. Is it possible to fill an array to add text, like in this example: for(var i:number = 0; i < 15; i++){ text = this.add.text(1710,70 + (i*67),this.array, { font: "65px Arial", fill: "#8b0000", align: "center" }); } I get this error: Cannot set property '0' of undefined
  5. I'm a newbie, as you can see. Is it possible to post some code as an example? Ik wan't to play a YouTube-movie from a screencast I made, in the middle of the screen.
  6. I wonder if it’s possible to embed YouTube-movies in Phaser directly. Now I’m using a movie file on my own server, but the image is flickering and not smoothly. Thanks for any tip to do that.
  7. I can't open the website of mightyfingers in Google Chrome anymore, nor can I use the editor, because Chrome says the website contains malware. Is this a joke?
  8. This works !!! Thanks a lot for the quick response. I'm a newbie (I worked with flash), but I chose for Phaser, because it has a perfect community. You are perfect, in other words!
  9. I want to play 5 sounds one after another in an educational game for my kids. I will do that with sounds in an array: var sounds = ["sound1"," sound2"," sound3"," sound4", " sound5"]; .... preload:function(){ ... for(i=0;i<sounds.length;i++){ game.load.audio(sounds[i],["ProgSounds/"+sounds[i]+".mp3","ProgSounds/"+sounds[i]+".ogg"]);} .... } create:function(){ ... for(i=0;i<sounds.length;i++) { sounds[i] = game.add.audio(sounds[i], 1); } ... playSounds:function(){ for (i=0; i < sounds.length; i++){ sounds[i].play(); } } For the moment I hear all the 5 sounds at the same time. Is there a way with Phaser to hear each sound one after another? I was looking already for several hours, but can't find a solution. I tried to work with a timer, the property isPlaying, ... Hopefully there's someone who can help me. Thanks for it in advance.