Refreshing ads without losing focus from website?

Discussion in 'HTML & Website Design' started by Johnny Doomo, Jul 31, 2007.

  1. #1
    I am trying to get banner ads to refresh every few minutes, but the problem that I'm running into, is that whenever the ads refresh it takes focus away from the main website. This is extremely important as the site has flash games on it and the main page can lose focus otherwise the flash game controls stop working when the ads refresh to show a new ad.

    I've already tried iframes and that steals the focus. Does anybody know how I can get ads to refresh to load a new ad, but not take focus away from the flash games?

    I would appreciate any help on this that I can get.

    Thank you.
     
    Johnny Doomo, Jul 31, 2007 IP
  2. Dino

    Dino Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi Johnny,

    Maybe you could serve the ads in flash as well (in a separate movie).
    This was the ads rotate and won't take the focus away.

    Thanks,

    Dino
     
    Dino, Jul 31, 2007 IP
  3. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good Idea. I hope this will work well.... ;)
     
    saurabhj, Jul 31, 2007 IP
  4. Dino

    Dino Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks =)
    Yep it should work great.

    You just need add every banner to the movie and have each banner run for x amount of frames depending on how long each will show for. Also need to add the actionscript so that banners are clickable and lead to the advertisers site when they are shown.
     
    Dino, Jul 31, 2007 IP
  5. Johnny Doomo

    Johnny Doomo Banned

    Messages:
    352
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What if the banners aren't flash to begin with, but are Google / Adbrite / YPN?
     
    Johnny Doomo, Aug 1, 2007 IP
  6. Dino

    Dino Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Aha good question didn't think of that. I'm thinking there must be a way to serve these ads in your flash movie just not sure how yet. I'd be interested in hearing ideas on this if anyone else knows.
     
    Dino, Aug 1, 2007 IP
  7. scubish

    scubish Active Member

    Messages:
    164
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    80
    #7
    How about you display the ad in a frame and then reload the frame with Javascript after x seconds or you could forward to another page if you have more static ads.
     
    scubish, Aug 2, 2007 IP
  8. Johnny Doomo

    Johnny Doomo Banned

    Messages:
    352
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Javascript alone or would it be more like AJAX?
     
    Johnny Doomo, Aug 6, 2007 IP
  9. scubish

    scubish Active Member

    Messages:
    164
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    80
    #9
    Javascript is fine.
    Of course it depends on how skilled you are with this, but an easy way would be to use the script below and create HTML pages like page1.html, page2.html, page3.html etc and paste the script in the page (increment the pagenumber).



    <script language="Javascript">
    <!--
    var URL = "page2.html"
    var speed = 500


    function reload() {
    location = URL
    }

    setTimeout("reload()", speed);
    //-->
    </script>
     
    scubish, Aug 6, 2007 IP
  10. Johnny Doomo

    Johnny Doomo Banned

    Messages:
    352
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yeah, I have zero javascript coding knowledge. Is this the forum to see if somebody can code this for me? Is it going to be something fancy that I'm going to have to pay for or only a few lines of code I could get somebody to simply write up for me quickly?
     
    Johnny Doomo, Aug 7, 2007 IP
  11. sagargemini

    sagargemini Peon

    Messages:
    625
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I tried using the JavaScript code given above. But somehow I am unable to get the results! Could you please help me?
     
    sagargemini, Aug 12, 2007 IP