Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2004
    Posts
    37
    Thanks
    0
    Thanked 1 Time in 1 Post

    Question printing images on the screen !!

    Hi,
    I wonder if is it possible to display many copies of one image at different position on the screen..? I want to use setInterval() and let my function produce one image at a time(say 1 second each) .To make it appear at different position I will use Math.random()...
    any idea ?
    Thanks

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,634
    Thanks
    0
    Thanked 649 Times in 639 Posts
    If you set the style on the new image tags you are adding and use position:absolute then you just need to select random top and left positions (probably in pixels) to decide where to display each new image.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Oct 2004
    Posts
    37
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi felgall,
    Could you please give a working example on that ?
    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •