Results 1 to 3 of 3

Thread: hover ad with cookies

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hover ad with cookies

    I've created a Flash movie ad that hovers over my home page. I want the Flash movie to only appear once for a user each day. Does anyone know a script that I can either place in my HTML, or a string that I can embed in my Flash movie that will accomplish this?
    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Javascript can be used for that. How exactly would depend upon how your hovering Flash content is triggered to begin with.

    Server side code could (requires host support) or Flash code might be able to be used, and either of these would be a better approach, because javascript isn't available to all users, and of those who have it, javascript cookies are not always reliable, or necessarily enabled. However, I am not as familiar with those other approaches.

    Most users would have both javascript and javascript cookies enabled, but could still delete or edit their cookies, if they so chose, to change whether or not they were to see the hovering content. This is a bit unusual, but can be done by users 'in the know'. Some few browsers will be configured to delete all javascript cookies upon exit.

    There is no 'HTML only' code for something like that.

    A link to your live page with the hovering Flash content would help me to determine how to implement a javascript solution.

    It would be easier to do it either once per each 24hrs beginning with each time it does appear for a given user, or once per browser session. A browser session begins when the browser is opened for the first time and ends when all instances of that browser are closed (exited). But a cookie could be set up to check both the time and the day number, however this would allow for a user to experience the hovering content twice in a row if they logged onto the site just before midnight (user's time) on any given day.

    Another consideration with javascript is what to do with non-javascript enabled browsers. In that case, do you want to show the hovering content always (would require it to have a Flash method for dismissing it), or never?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the suggestions. I think I'd definitely like to figure out a way to do it without Javascript, because of the reasons you mentioned. I am the host for the site, so any serverside scrips are not a problem.

    But, if we did go with the Javascript option, I like the idea of having the Flash appear once per each 24hrs beginning with each time it does appear for a given user, and if users don't have a Javascript enabled browser, then I'd like the Flash to show up always.

    Here's the test page

    Thanks again

Bookmarks

Posting Permissions

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