Welcome, Guest
  • Author Topic: simple txt login problems  (Read 10278 times)

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    simple txt login problems
    « on: 02/13/07, 23:29 »
    ive made a login which gets loaded into the main movie and it works great when testing it in flash player, but when i upload it and test it in a browser it doesnt work?
    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: simple txt login problems
    « Reply #1 on: 02/14/07, 02:21 »
    If you're using script in outsides domains, the player prevents the access and you need a crossdomain.xml file

    Jorge

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    Re: simple txt login problems
    « Reply #2 on: 02/14/07, 09:30 »
    What You Mean Outside Domains? its just a simple login that checks a txt file for users
    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: simple txt login problems
    « Reply #3 on: 02/14/07, 10:32 »
    If you're loading a local textfile should work, just check the paths (i.e, if the move is loaded into another movie, path are those from main movie)

    Jorge

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    Re: simple txt login problems
    « Reply #4 on: 02/14/07, 11:54 »
    it works but just wont load when using ina browser
    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: simple txt login problems
    « Reply #5 on: 02/14/07, 12:12 »
    the textfile has to reside under the same domain.

    Be aware, that localhost is not the same as local filesystem and 127.0.0.1 is not the same as localhost, even thogh it technicaly is.
    happy flashing
    8)
    Ronald

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    Re: simple txt login problems
    « Reply #6 on: 02/14/07, 14:08 »
    all files are in the same directory..
    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: simple txt login problems
    « Reply #7 on: 02/14/07, 16:53 »
    Tghe HTML, the swf and the txt should be in the same directory. Use the LoadVars object to load data. Use dinamyc textfields to output values to Stage and check if variables are coming

    Jorge

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    Re: simple txt login problems
    « Reply #8 on: 02/17/07, 20:30 »
    This Is What I Got
    Flash Movie With 3 frames

    1st Frame: got 2 input fields var CurrentUser, var password and a submit button

    Button AS:

    Code: [Select]
    on (release) {
        if (CurrentUser add password eq "" add "") {
            Status = "Sorry Your Username and Password Dont Match Our Database You Must Be On Our Staff To Log In";
        } else {
            gotoAndPlay(2);
        }
    }

    2nd Frame: Same textfields and my frame actions are:

    Code: [Select]
    U = CurrentUser add ".txt";
    loadVariables(U, _root.Main, "POST");

    3rd Frame: Same textfields and my frame actions are:

    Code: [Select]
    if (password ne password33) {
        Status = "Sorry Your Username and Password Dont Match Our Database You Must Be On Our Staff To Log In";
    } else if (password eq password33) {
        gotoAndStop(4);
    }
    stop();

    What  This Code Does Is When SomeOne Tries Logging In What Ever Name Is In The CurrentUser Field It Searches The Directory For A Txt File Named That.. When Or If Its Found Then It Looks Inside For The Password And if it match's it lets you pass

    Each txt File looks like this for example and etc...

    THE TXT NAME: jeff.txt
    CONTENTS OF TXT: password33=333

    Well This Works All Fine But When I Load The Login Movie Into The Main Movie It Don't Work.. I Even Tried Using _root.Main and everything.. can you guys make anything out of this and give me a hand?

    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: simple txt login problems
    « Reply #9 on: 02/18/07, 15:09 »
    LoadVariables loads always the data on _root, so you lost the data because now you're not on _root, using LoadVars, data is encapsulated and the problem dissapear.

    Jorge

    B-L-A-D-E

    • Seasoned Programmer
    • ***
    • Posts: 221
    • Intermediate Flash Designer/Novice-Programmer
      • MSN Messenger - millerstephen@hotmail.com
      • AOL Instant Messenger - WICKIDxCLOWNxBOY
      • View Profile
      • SWJuggalos
      • Email
    Re: simple txt login problems
    « Reply #10 on: 02/19/07, 00:58 »
    I Got It.. I Tried

    Code: [Select]
    U = CurrentUser add ".txt";
    _root.Main.loadVariables(U, _root.Main, "POST");
    « Last Edit: 02/19/07, 01:43 by B-L-A-D-E »
    [shadow=Blue,left,300]Stephen Miller[/shadow]
    Aim:WICKIDxCLOWNxBOY
    E-Mail: MillerStephen@Hotmail.com

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: simple txt login problems
    « Reply #11 on: 02/19/07, 10:12 »
    little hint for your future: get rid of Flash 5 syntax and use the objects flash offers.
    happy flashing
    8)
    Ronald