Security Panel login
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Security Panel login

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    3

    Security Panel login

    Hi everyone, I'm very new to flash and have only created a few flash websites freelance.
    I'm currently playing with the idea of having a keypad style login for a site.
    What I would like to achieve is the person enters their code to access the site by clickingon the numbered keypads and hitting the enter button. I would also like the code theyenter to display in a dynamic text box. I have buttons setup like a keypad 1-9 Clear and Enter which when pressed add the specific number to a dynamic text box. I going to use PHP and mySQL when the person clicks on the enter button to check the dynamic text box for a legitimate code.

    My first stumbling block is apon clicking another button it replaces the data allready in the dynamic text box instead of just adding to it. Any help would be most grateful. I know why my buttons are doing what they do, but I no idea what script to use.
    Attached Images Attached Images

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    try this

    PHP Code:
    // let say this is the code for button one
    on(Release){
         
    dynamicText.text dynamicText.text "1";
    }

    // Button 2
    on(Release){
         
    dynamicText.text dynamicText.text "2";
    }

    and 
    so on 
    Just replace "dynamicText" with your instance name.

  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    3
    Thnx for the reply.

    I tried the code you suggested but without success.
    It doesn't seem to input any number into the textbox or give me an error.
    I'm trying to understand the code, what is the .text part in dynamicText.text?
    I changed the instance name, I also tried changing the variable name of the dynamic text box as this was how I sending numbers to it.

    on (release) {
    Display = "2";
    }

    I'm sorry if this is really simple and I'm being a retard. Is it because its not as simple as I think? Do I have to store these numbers in memory....

    Edit. I got it to work

    on(Release){
    mytext = mytext + "1";
    }
    Last edited by nagumo; 11-22-2007 at 10:43 AM.

  4. #4
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    glad to here - Just was fixing to post a sample.

  5. #5
    Junior Member
    Join Date
    Nov 2007
    Posts
    3
    This is all just for a bit of fun, and to learn more about actionscript really so being secure isn't an issue here.

    Now when You hit the enter button I want it to check the contents of the dynamic textbox to make sure they match a set number, if so forward you to cerain frame number. display is the variable name for the dynamic textbox.
    Am I going about this the right way?

    on(Release){
    if(display == answer){
    this.gotoAndStop("2");
    }
    else{
    this.gotoAndStop("3");
    }
    }

  6. #6
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    you can do it that way - but change this

    this.gotoAndStop("2");

    to this

    this.gotoAndStop(2);

    // without quotes for frame number
    // with quotes for frame label

  7. #7
    Junior Member
    Join Date
    Nov 2007
    Posts
    3
    Ah ic, thank you for your patience. I've used "" around frame numbers always, it has worked, but cheers. The code still doesn't see to work as it always returns the else command....
    I've tried

    if(display == 1397)

    but still returns else command if 1397 is entered.

    i'll add the .fla so you can see my mess in all its glory
    Attached Files Attached Files

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

Poll by Flashkit.com