dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [Resolved] cookie with getURL in Flash

  1. #1
    Senior Member Vincent26381's Avatar
    Join Date
    Feb 2003
    Location
    The Netherlands
    Posts
    833

    cookie with getURL in Flash

    Hi,

    After searching this board I picked up a tutorial with an example to write, read and delete a cookie.

    It all works as it reads,writes and deletes the cookie like it should but: ()

    With the action to write or delete the cookie a blank page opens with only a '#' in it.

    This ia what I'm using:

    write cookie:
    code:

    on (release) {
    timetokeep = "86400";
    field_time = "365"; // 1 jaar
    getURL("javascript:howlong = new Date(); howlong.setTime(howlong.getTime() + " add 1000*timetokeep*field_time add "); document.cookie = '" add name1 add "^" add val1 add "|" add name2 add "^" add val2 add "' + '; expires=' + howlong.toGMTString(); location.href='#'");
    }



    delete cookie:
    code:

    on (release) {
    // Here we just setting ending of valid date to past
    getURL("javascript:document.cookie ='AnyStringEvenEmpty' + '; expires=Sat, 5 Feb 2000 12:00:00 UTC'; location.href='#'");
    }



    Should I use a frameset or something? I have no idea how to solve this....

    Thanks in advance,


    Vincent
    Vincent
    SWIS BV

    Last edited by Markp.com on 07-23-2003 at 02:25 AM

  2. #2
    Senior Member Vincent26381's Avatar
    Join Date
    Feb 2003
    Location
    The Netherlands
    Posts
    833
    Please disregard;

    void(); instead of location.href='#' did the job I guess (at least it works in IE)

    Vincent
    SWIS BV

    Last edited by Markp.com on 07-23-2003 at 02:25 AM

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center