• Content Count

  • Joined

  • Last visited

  1. AmAuron

    Border Problem

    Yes i need to use that, i was talking about the functions to make the border using Phaser, like Phaser doesn't have a tool to draw borders? =)
  2. AmAuron

    Border Problem

    Hi there, i have a "simple" problem that i want to solve. How do you guys sugest that i do a border, that when you hover it with your mouse it goes larger and changes's an example: Thank you for reading this, and i wait for feedback.
  3. Thank you very much! This solved it, one more there any way of making this work with a variable on the state (this.variableonthestate)?
  4. Hi there, sorry to bother you guys with maybe a simple mistake, but i'm doing this for at least 8 hours without sucess, if you guys can help me out, would be awesome... So i have a server, and i'm using jquery to retrieve the information from the server, the problem is...i get the information but it doesn't save it to my variable, and i kinda need the information on the variable. Here's part of my code so you understand the problem: I tried 2 ways to retrieve the data... this is the current way, where he says SaveDataonVar is not a function... TheGame.MainMenu= function() { this.recieved = false; //declaring an empty userfound this.userfound; };TheGame.MainMenu.prototype = { init: function(identifier){ this.identifier = identifier; }, preload: function(){ this.FetchData(); }, update: function(){ if(this.recieved == true) { this.hellouser =,0,'Hello' +; this.hellouser.font = 'Arial'; this.hellouser.fontSize = 18; this.hellouser.stroke = '#FFFFFF'; this.hellouser.aligh = 'center'; this.hellouser.fill = '#FFFFFF'; this.hellouser.update(); this.hellouser.updateText(); this.hellouser.x =; this.hellouser.y = 40; } }, FetchData: function(){ $.ajax({ type: "POST", url: 'http://localhost:1337/user/find', data: { id: this.indentifier }, success: function(data, status, xhr){ if (data){ this.SaveDataonVar(data); } } }); }, SaveDataonVar: function(data){ this.recieved = true; this.userfound = data; console.log('user found has the value :' + this.userfound); } and this way where the code doens't give me an error, but still the variable userfound isn't change outside the function only inside. FetchData: function(){ $.ajax({ type: "POST", url: 'http://localhost:1337/user/find', data: { id: this.indentifier }, success: function(data, status, xhr){ if (data){ function SaveDataonVar(data){ this.recieved = true; this.userfound = data; console.log('user found has the value :' + this.userfound); } } }); }Can someone help me? I know that maybe this is some newbie mistake... Thank you for your time to read this topic and thank you for your answers in advance.
  5. IT worked guys ty....@tips4design Is there anyway to make this a little safer? like everyone can see their id :X
  6. Ty for the help i will test it out now ! I will give feedback soon
  7. Okay but i got several states in this order....Boot State -> Preloader State -> Main Menu State ->goes to several states from here I think you mean to put that on the Boot State right? The Boot state is the first state that runs and i use him to load the sprite of the preloader bar and logo of the game.
  8. Thank you for more question if you may....where should i put this like into code on the game so that i get the variable on the start of the game?
  9. Hi there, Sorry if this question seems simple, but i searched the forum and didn't find any specific topics related to this issue. I'm doing a game that uses the user login on a page as an identifier to record and save his score. My question is, imagining we are using a server, the user makes the login and after that is redirected to the game, is there any way to do an HTTP get or a function the get extra information that we are passing when we are redirecting to the game? The only thing i need is when we are redirecting, the game recieves the username. Thank you for your patience and answers.
  10. Hi there, i want to know how should i adress this issue, i have an audio file with the name "Kalimba", so for loading that to my game i used the function'kalimba', 'assets/audio/kalimba.mp3');Now my problem is i want to keep using the name "kalimba" (his key) but replace the i want to overwrite it. I searched the documentation and the audio file is the only type of file that doesn't have a replace parameter. So, my question is, how should i deal with this problem? Thank you for your time to read this topic, hope you can help me
  11. One more question related to this issue...imagine that you have 2 states... one of them has something like this: Previous State (Preload state) //this.listofimages is an array of locations of images//this.imagearray is an array that countains the numbers of the images that i must loadpreload: function(){ //loading of sound before while(this.i<5) { this.load.image('lvl1'+ this.i, 'assets/images/biblioteca/'+this.listofimages.imagens[this.imagearray[this.i]].imagem+'.jpg', true); console.log('assets/images/biblioteca/'+this.listofimages.imagens[this.imagearray[this.i]].imagem); this.i++; }},update: function(){ if(this.cache.isSoundDecoded('fundosong') && this.ready == true) { this.state.start('Game', true, false, this.listofimages, this.imagearray); }}Next State (Game state) create: function(){ this.imagem = this.add.image(,, 'lvl1'+this.counter); this.imagem.x = - 150;}basicly the 2nd time the images won't change....even with overwrite? If so how can i get arround this...and can i apply the same logic for sounds too? Thank you for your time to answer this question.
  12. Hi there, i was searching the forum for a method to send information trough the states, and found this post that was very helpfull. My question is.... Is there a way to create an object in another .js file and use it instead of passing the information with the function state.start? Thank you for your time, and sorry if i didn't explained myself well...English isn't my native language.