• Content Count

  • Joined

  • Last visited

About Rayj

  • Rank

Recent Profile Visitors

726 profile views
  1. I'm fairly new to programming so bear with me. I have a webpage that is access like this: https://xxxx.com:1234 I am using node.js and not apache. What is the best way to change the access to https://xxx.com Next, the page has a drop down menu. It has 3 choices: Super User, Moderator and User. I want to access the page something like this: https://xxxx.com/SuperUser or https://xxxx.com/moderator or https://xxxx.com/user The 3 choices have to password protected also. The code looks something like this: <select> <option>Super User</option> <option>Moderator</option> <option>User</option> </select> <button>Continue</button> ... ... ... var select = document.querySelector('select'); var button = document.querySelector('button'); ... ... button.onclick = function() { var access = select.value; So I have to get rid of the button.onclick for one, but how do I incorporate the same access into a URL? Thanks in advance! Ray
  2. I think using JSON.encode is doing the trick for me. Now have to figure out how to make my code reiterative. The integer will be changing fairly often.
  3. Learning JS will not tell me how to pass data from PHP to Javascript. I've taken multiple Javascript tutorials. Not one mention of PHP.
  4. I have a small PHP script that pulls some data out of a database. There are two parts to the data, a string variable and an integer. (ex: Chevy 22.55) I want to pass these to PIXI Javascript in order to display them like this: Chevy 22.55 Note: No space after Chevy. I don't know why posts are double spaced in this forum? Thanks, Ray
  5. Rayj

    Scrolling Text

    Is there an example anywhere of scrolling text? I want to scroll text from right to left at the bottom of a webpage. Thanks, Ray
  6. Rayj

    Outputting graphics...

    And I made no changes but I am getting this error: The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page. Now what?
  7. Rayj

    Outputting graphics...

    But I am using Firefox?
  8. Rayj

    Outputting graphics...

    Wow....why is a simple console.log acting so weird? I have a console.log right after entering the loop. It only triggers once? GET [HTTP/1.1 200 OK 16ms] "Pixi.js 3.0.6 - WebGL - http://www.pixijs.com/" pixi.min.js:7:27113 "got here in loop!" If I add another console.log a little further down but still inside the loop, I get: GET [HTTP/1.1 200 OK 12ms] "Pixi.js 3.0.6 - WebGL - http://www.pixijs.com/" pixi.min.js:7:27113 "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" "got here in loop!" "got here after renderer!" Makes no sense to me!!!!
  9. Rayj

    Outputting graphics...

    Ok but that is not an issue on it's own. Ok, I changed it to console.log and now it runs, but I only see one console.log message? The console.log is inside a loop that should have 13 iterations?
  10. Rayj

    Outputting graphics...

    All I am trying to do here is output playing cards 2,3,4,........10,J,Q,K,A, of Hearts, For some reason, all I see are two cards, the A of Hearts and the King of Hearts? When I enable the document.write, I see 13 outputs of "Got Here!" but then no cards! Here is my code: for(i=2; i < 15; i++){ loader.add("images/cards_gif/h" + i + ".gif");} loader.load(setup); var table = new PIXI.Sprite.fromImage("images/table.png"); table.x = 300; table.y = 300; stage.addChild(table); //renderer.render(stage); var card = {}; for(i=2; i < 15; i++){ //document.write("got here!"); card = new PIXI.Sprite.fromImage("images/cards_gif/h" + i + ".gif"); stage.addChild(card); renderer.render(stage); card.x = card.x + 72; card.y = 0; };
  11. Rayj

    Outputting graphics...

    I am not seeing a single thing in Firebug besides the "Got Here" that prints with each loop iteration? I comment out the document.write and all is well? Weird! Ray
  12. Ok I am outputting some graphics using PIXI. Looks fine. However if I add a simple document.write("Got Here!"); I see the Got Here, but the PIXI output disappears? Any idea why? Ray
  13. Rayj

    Javascript Question...

    So I have this code: var card = {}; for(i=1; i < 11; i++){ card = new PIXI.Sprite.fromImage("images/cards_gif/h" + i + ".gif");} //Add the table and cards to the stage table.x = 300; table.y = 300; stage.addChild(table); stage.addChild(card.1); card.2 = 72; card.2 = 0; stage.addChild(card.2); But I'm getting this error: SyntaxError: missing ) after argument list at stage.addChild(card.1); Ideas? Ray
  14. I am using PIXI, but I have a Javascript question. Rather than doing somehing like this: var card1 = new PIXI.Sprite.fromImage("images/cards_gif/h1.gif"); 52 times (for a 52 card deck of cards), how could I simplify this using a loop? (I am only using 10 cards right now, but in total, there would be 52) So right now I have the following: var card1 = new PIXI.Sprite.fromImage("images/cards_gif/h1.gif"); var card2 = new PIXI.Sprite.fromImage("images/cards_gif/h2.gif"); var card3 = new PIXI.Sprite.fromImage("images/cards_gif/h3.gif"); var card4 = new PIXI.Sprite.fromImage("images/cards_gif/h4.gif"); var card5 = new PIXI.Sprite.fromImage("images/cards_gif/h5.gif"); var card6 = new PIXI.Sprite.fromImage("images/cards_gif/h6.gif"); var card7 = new PIXI.Sprite.fromImage("images/cards_gif/h7.gif"); var card8 = new PIXI.Sprite.fromImage("images/cards_gif/h8.gif"); var card9 = new PIXI.Sprite.fromImage("images/cards_gif/h9.gif"); var card10 = new PIXI.Sprite.fromImage("images/cards_gif/h10.gif"); How could I use a loop to reduce the lines of code? Something like: for(i=1; i < 11; i++){ var card + i = new PIXI.Sprite.fromImage("images/cards_gif/h" + i + ".gif");} This obviously doesn't work. I need variables card1 through card10 (through card 51 later). Thanks, Ray
  15. Here is webpage for Pixi.js : http://www.pixijs.com/ You could go here for some great examples: http://pixijs.github.io/examples/index.html?s=basics&f=spritesheet.js&title=SpriteSheet%20Animation