Expire Your App (EASY WAY)


/ Published in: ActionScript 3
Save to your folder(s)

Ability to expire your AS3 based application in as easy as 1, 2, 3 with the amazing Rivera Era.


Copy this code and paste it in your HTML
  1. //ITS THE RIVERA ERA
  2. //THE PUERTO RICAN DREAM COME TRUE
  3. import flash.events.Event;
  4.  
  5. //REPLACE: YEAR, MONTH, DAY BELOW
  6. //WITH YOUR EXPIRE DATE IN NUMBER FORMAT
  7. var expireDate:Date = new Date(2014,5,31);
  8. var curDate:Date = new Date();
  9.  
  10. stage.addEventListener(Event.ENTER_FRAME, chkExpire);
  11.  
  12. function chkExpire(evt:Event):void
  13. {
  14. if (curDate <= expireDate)
  15. {
  16. //YOUR EXPIRE ACTIONS HERE
  17. }
  18. else
  19. {
  20. return;
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.