A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Go to here when the date is this???

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    bristol
    Posts
    3

    Go to here when the date is this???

    hello

    I need a little help. I need some actionscript which i can put into a movie and when that movie gets to a certain date ie my birthday the file redirects to my website.

    I would like the movie to always redirect to my site, even when that date has passed.

    thank you in advance

    g

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    In simple terms something like this would do that:

    PHP Code:
    var date:Date = new Date();
    var 
    month:Number date.getMonth()+ 1;
    var 
    day:Number date.getUTCDate();

    trace(month " " day);

    if(
    month >= && day >= 17){
        
    //getURL("somesite.html");
        
    trace("It is on or past September 17th");

    but this would reset at the end of the year. You would need to include a year to the if statement to avoid that. Let me know if you need help figuring this out.

    welcome to FK
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    bristol
    Posts
    3
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center