www.webdeveloper.com

Search:

Type: Posts; User: someone2088

Search: Search took 0.01 seconds.

  1. Actually, just looking at my code, I have...

    Actually, just looking at my code, I have declared the function to check if the click is on an image like this:


    function isClickOnImage(event){
    var clickX = event.clientX;
    var clickY =...
  2. Hi, I added a console.log line into my while...

    Hi,

    I added a
    console.log line into my while loop, to check whether a click on an image is being detected:


    while(imageCheckIteration < sources.length){
    if((clickX >...
  3. Using an event, triggered on the HTML5 canvas, to change the text in HTML paragraph

    I have a web page which is displaying a number of images on the HTML5 canvas. It is possible to drag and drop most of these images around the canvas- a feature I added using the KineticJS library. I...
  4. Sorry, completely forgot I had posted already!

    Sorry, completely forgot I had posted already!
  5. Replies
    2
    Views
    744

    Hi, I only want to draw the images once, and the...

    Hi, I only want to draw the images once, and the idea of using a loop was simply so that I didn't have to write out the full line for drawing an image ten times- the images I want to draw are simply...
  6. Using a JavaScript while loop to draw images to canvas

    Hi,

    I have the following JavaScript while loop, which I want to use to draw ten .png images to the HTML5 canvas:



    while(fileName < 11){
    /*Create an...
  7. Craig Reynolds' Boids algorithm- simulation of flocking behaviour using HTML5 and JS

    Hi,

    I have a simple web page that is displaying a blank HTML5 canvas.

    In the web page, I have some JavaScript code that I want to use to display a simulation of Craig Reynolds' Boids algorithm...
  8. Replies
    2
    Views
    744

    JavaScript iteration

    Hi,

    I want to use JavaScript to draw a series of images onto an HTML5 canvas. I have the following while loop, which I had hoped would draw all of the images to the canvas, however, it is...
  9. Thanks, I managed to get it working.

    Thanks, I managed to get it working.
  10. HTML5 canvas- use a function to clear an image that has been drawn to the canvas

    Hi,

    I have a JavaScript function that draws an image (which is being used as a button), to my canvas... When the image is clicked, another function is called, which draws the next set of elements...
  11. Resizing a .png image when drawing it to the HTML5 canvas using JavaScript

    Hi,

    I am trying to draw a few .png images to the HTML5 canvas using JavaScript. I currently have a function that will draw an image to the canvas, but the image is too large for the canvas, so...
  12. Replies
    0
    Views
    838

    Creating a button on the HTML5 canvas

    Hi,

    I've written a basic webpage that has an HTML5 canvas. On the canvas, I've used a JavaScript function to display an image. I now want to be able to turn that image into a button, which will...
  13. Hey, I've had a go at what you've suggested, but...

    Hey, I've had a go at what you've suggested, but for some reason, my code isn't performing all of the functions it should. At the moment, when the page loads, a function called 'startGame() is...
  14. Hey, Thanks for your suggestions. I had...

    Hey,

    Thanks for your suggestions.

    I had thought about using a loop, but I just thought a switch statement might help to keep the code a bit tidier and more organised. I'll give it a try anyway...
  15. Using one JavaScript function to call another

    Hi,

    I'm writing a web page using HTML5 and JavaScript that will allow users to learn some basic Welsh by playing a very simple game.

    I'm currently trying to write the game using JavaScript, but...
  16. Replies
    3
    Views
    1,373

    Reynolds' Boids algorithm

    Hi,

    I am attempting to use HTML 5 and JavaScript to display a simulation of Reynolds' Boids algorithm on a webpage.

    The algorithm simulates the flocking behaviour of birds while they're in...
Results 1 to 16 of 17
HTML5 Development Center



Recent Articles