Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you expire a SWF?

Status
Not open for further replies.

lorenelks

Instructor
Joined
Dec 10, 2002
Messages
4
Location
US
Hi:

I want to be able to:

(1) expire a swf within a certain number of days after it is first run.

I know I can use getDate() to determine the current date. However, how to I have the swf (1) determine the current date (2) save this info somewhere and (3) have the swf expire (say 60 days after it is first ran).

(2) expire a swf on/by a certain date.


Any help on the code here would be great.

Thanks,
Loren
 
top of my head

frame 1 blank

frame 1 psuedo code

if date < some date
play
else
stop


 
OK. So use getDate()= new Date, then use the code in the way you mentioned? Can you give me more specific code?

Thank you for your help,
Loren
 
untested but ought to work

now = new Date() ;
maxDate = new Date(2006, 01, 06) ;
if (now > maxDate) {
stop()
}else{
play()
}
 
then it wont work

but is full fledged solution worth the hassle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top