1 Reply Latest reply on Apr 17, 2006 10:59 AM by blemmo

    log-in script

      If there anyone out there who can help me with a log-in script for a flash website. Basically we have confidential files that we want clients to view and not to all the public. I want to set up a log-in button and the client will have to type in name and password then take you to another page with various projects to view.

      Can anyone please help me? is this hard to do in flash? i don't know html coding....
        • 1. Re: log-in script
          blemmo Level 1
          Hi,

          there should be some server side scripts or techniques involved, to check the password. It's no use checking the password in Flash, because then it would have to be written into the swf, and anyone with a swf decompiler can just read it out and use it.
          The easiest way should be using directories protected by a htacess file (if it's an apache server). Here's an introduction to htacess: http://www.freewebmasterhelp.com/tutorials/htaccess/. Then everyone has to put in a password before s/he can access the files in that directory. This is handled by the browser, so you don't have to do anything in the Flash files.
          You could also do a login screen in Flash, then you would have to send the input to the server (using the LoadVars class); the script compares the sent password with the correct one and sends back the information if it fits or not (e.g. a boolean value). Then again in Flash you could check the returned value and decide what to do next. But this isn't very safe, afaik, so I would recommend using htacess (because this also prevents direct access to the files).

          hth,
          blemmo