3 Replies Latest reply on Apr 30, 2009 4:51 PM by kglad

    time limit for flash website



      i'm not new to flash, but i've just been learning what i can from the net. anyway, a friend of mine bought a flash website template off the net and gave it to me to modify for his wife's business (it's a spa). so i've got it all done and they are wanting to upload it onto the server for the grand opening this weekend, (even though i haven't been paid for doing the work yet). so i was wondering if there was some sort of actionscript i could insert so that the website will only play for a specific time (lets say from 5:00pm on 4/31/09 thru the weekend, to say... 6:00am on 5/3/09.


      any help would be great. and if this is possible, it would be extremely nice if one of you Geniuses could maybe even help out with the script

        • 1. Re: time limit for flash website
          kglad Adobe Community Professional & MVP

          you can add a movieclip to the main timeline that contains some code to close the swf if the user's system clock shows a date of 5/4/09 or later.    there may be a problem with some users whose system clock is set for next year, but that shouldn't be too common.  using server-side code is much more reliable but that's probably not a good option in this situation.


          anyway, when the date is past 5/4/09 or whatever date you pick use:




          to close down the swf.  when you get paid,  delete that movieclip.

          • 2. Re: time limit for flash website
            shaggy_man2004@yahoo.com Level 1

            i'm not very familiar with actionscript. the script for the site was already wrote when he purchased it, all i had to do was change the content. that actually sounds like it would work though. besides, how many people are gonna change their system clock just to see if they can load website content. i would've  never thought about it. i guess it's time for me to start googling.


            thanks for the help.

            • 3. Re: time limit for flash website
              kglad Adobe Community Professional & MVP

              there's nothing to google.  check the flash help files for info and code samples on using the date class.