-
Hey Guys,
Im looking to make a crude password protection for my flash file. I want to be able to draw from a text file that has a list of passwords and logins. Is it possible to do this with simple action script or must I use CGi and all of those other back end scripting programs that I know nothing about
please help guys if you have the time.
Thanks
Don
-
I personally think that extracting login and passwords from a text file really ruins your security. There are a couple password protection tutorials that are pretty good.
http://www.flashkit.com/tutorials/Ac...65/index.shtml
http://www.flashkit.com/tutorials/Ut...42/index.shtml
http://www.flashkit.com/tutorials/Ac...01/index.shtml
I utilize this on some parts of one of my sites. Just make sure to check the html to make it doesn't include all the text in your movies, like such things as links.
Hope this helps!
-
everythings possible with flash!
of course, you're going to be about as safe as an open door using pure flash for password protection...
if you're only going to have a few login names/passwords, do this:
structure your textfile like this:
&validname[0]=fred&
&validname[1]=tom&
&validname[2]=pete&
&validname[3]=mary&
&validname[4]=sue&
&validpassword[0]=password0&
&validpassword[1]=password1&
&validpassword[2]=password2&
&validpassword[3]=password3&
&validpassword[4]=password4&
then in flash:
loadvariables or loadvar the text file at the start of the movie.
in the part where the user enters a name and password, tell the "accept" or "submit" or "go" or "whatever" button to go to another frame with AS something like this:
for (i=0; i<=/:validname.length; i++){
if (enteredname==/:validname[*i] and enteredpassword==/:validpassword[*i]){
login="success";
}
}
then on the part of the area that is password protected, at the start of the AS for that frame put:
if (login!="success"){
gotoAndPlay(the frame with the login screen or an error or something);
}
the "for" loop above where it checks the login name and password may need refining..i've got it in a php script but it's a complicated piece of code due to ip blocking and other bits and pieces....
cheers,
Ben
-
militar...
with those nasty bits of software floating around that pinch AS from a .swf file...you're providing a map of how you password-protect areas of your site anyway...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|