A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: HELP! - Changing password based on the date

  1. #1
    Junior Member
    Join Date
    May 2003

    HELP! - Changing password based on the date

    I need to figure out how to implement a changing password based on the date in Flash MX. I need to allow the user to use their password for three or four days and then have it expire based on the date. The password has to be alphanumeric. Example:


    The five digit number after the P is actually the date. In the example above the order is day (two digits), then month (two digits) then year (one digit), so in this example the date is 17, May, 2003. This password will work for today plus three days. That is until midnight on May 20 in this example. If it does not exactly match the format above with the date number still valid, then it should give an error message:

    Please contact administrator for a valid password. It does not matter what this says, it just has to say something to that effect.

    Alright, this is where it gets even trickier. The alpha part of the password is actually supposed to direct the user to one of four pages or frames based on the letters entered. Example:

    PxxxxxMGN 01.htm or frame 1
    PxxxxxMGP 02.htm or frame 2
    PxxxxxMYF 03.htm or frame 3
    PxxxxxMKT 04.htm or frame 4

    This is for an extra credit assignment for an advanced Flash MX class and I could really use some help with it. I missed an assignment and need the extra credit points to pass with a decent grade.

    Any help at all is greatly appreciated.

    Thank you for your time.

  2. #2
    Senior Member Sir Yendor's Avatar
    Join Date
    Sep 2001
    Over here
    Not sure about changing the password based on date (would love to know)

    This will help you with a specific password taking the user to a specific page. Place this code on your button:

    on (release, keyPress "<Enter>") {
    if ("PxxxxxMGN" eq pass) {
    gotoAndStop("frame 1");
    } else if ("PxxxxxMGP" eq pass) {
    gotoAndStop("frame 2");
    } else {

    On the "wrong" frame, simply have the text "Please contact administrator for a valid password" or whatever you want.

    "frame 1" and "frame 2" should actually be frame labels. I find it best to give them labels based on teh type of content on the page as I have done with "wrong" being the page someone gets to when typing in a wrong password.

    hope this helps. Let me know if you get the answer to the date change issue.

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