No announcement yet.

Randomly generating ads?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Randomly generating ads?

    Say I have a CD that I want to randomly display ads in a given window. Is this possible? Will I have to create a text file of some sort? How can I do this?

  • #2
    Re: Randomly generating ads?

    Hi - can yu give some info on:

    1. what kind of ads will these be [graphics / text etc]?
    2. what window will these be displayed in?
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]


    • #3
      Re: Randomly generating ads?

      They will be some sort of graphic file (gif, jpeg, png, bmp, etc...)

      The window will be the top portion of the screen, and horizontally all the way across.


      • #4
        Re: Randomly generating ads?

        Indeed I am wondering about a similar situation.
        I would like to know how to change the image in a graphic placeholder. Currently I am thinking of using multiple image objects and forcing them hidden/visible on action, but I really think there should be an easier way.

        Think of it as a slideshow type of thing using a button to change images.


        • #5
          Re: Randomly generating ads?

          It may be easiest to do this in html/javascript
          You can use the following javascript:

          - in the <HEAD> paste the following:
          <pre><font color=green>
          // Set speed (milliseconds)
          var speed = 4750

          // Specify the image files
          var Pic = new Array()

          // to add more images, just continue the pattern, adding to the array below
          Pic[0] = 'address/picture1.jpg'
          Pic[1] = 'address/picture2.jpg'

          var t
          var j = 0
          var p = Pic.length

          var preLoad = new Array()
          for (i = 0; i < p; i++){
          preLoad[x] = new Image()
          preLoad[x].src = Pic[x]

          function runSlideShow2(){
          document.images.SlideShow2.src = preLoad[j].src
          j = j + 1
          if (j > (p-1)) j=0
          t = setTimeout('runSlideShow2()', speed)
          </pre></font color=green>

          - In the <BODY> paste the following where you want the pic to be displayed:

          <pre><font color=green>
          <table border="0" cellpadding="0" cellspacing="0">
          <td id="VU" width=119 height=128>
          <img src="address/picture1.jpg" name='SlideShow' width=119 height=128></td>
          </pre> </font color=green>

          [/quote]<font color=red>
          NOTE: in the Preload lines where you have [x] .. change the letter x to i
          I had to change it here coz it was intefering with the UBBcode and it wasnt displaying correctly</font color=red>

          Hope this helps
          = Derek
          ["All glory comes from daring to begin" - fortune cookie]


          • #6
            Re: Randomly generating ads?

            BTW - yu may need to change the image width/height to suit [img]/ubbthreads/images/icons/smile.gif[/img]
            = Derek
            ["All glory comes from daring to begin" - fortune cookie]


            • #7
              Re: Randomly generating ads?


              Haven't been looking at it for generating ads as such, but I have found that Windows Media Player does support viewing image files (or jpgs at least) and you can load images into your viewer instead of having 20 different images loading onto your page and trying to keep track of what is being show and what is being hidden. It also has a kind of merge in effect as it is defaultly set to black and the image blends into show. I have it for a slide show of pictures for the local area, but I think it could be used with something to randomly generate an image ad, but they would all have to be the same size, which shouldn't really be a problem....

              Let me know what you think!
              If you can read this, i have yet to write a witty and imaginative signature.... sorry...