Insert password sos!

Hello,
I already have a flash website all set up and working but they want it to be password accessible only.

How can I insert a password INTO the .swf that I already created?
Many thanks,
F

I’d say create a new swf, make a password script and when it’s correct let it load the swf into this one.

:-\ swf passwords forms are very unsecure! I’d use php/php with mysql!

You’re right syko. But they’d have to use an SWF decompiler to view the password so if it doesn’t have to secure sensitive content, you could you that. But still, load the password from php or mysql is more secure indeed.

This is getting too complex for me; all I need (in an ideal world) would be to insert a frame right at the start that asks for a password in order for the .swf to go on. If the password is right, then it keeps going and if it’s wrong, then it stops. Is there not a simple way of doing that?

here!

http://www.kirupa.com/developer/flash5/ifelse.htm

If you leave the menu available, someone can just rightclick the swf and click on play, so it’ll move on to the protected part anyway.
And the server-side solution was suggested because pple can look at the code in your swf and thus read out the password…how secure do you want it, is the question?

I see … I think I’m just going to try and find a stupid little javascript prompt login to place on the page, because I’ve spend 2 and a half months working on this site and would like to just be over with it and don’t have the energy to start all over … thanks for all of your comments, though, I truly appreciate it!!

you could then just use a .htaccess file with all the name/pass in it… ugly, but works…

have no idea what that is, eyezberg … plus, I only need a password access, since they want it to be limited for the moment to people who have the password. Will look up your htaccess in google, though …
thanks,
F

*Originally posted by eyezberg *
**If you leave the menu available, someone can just rightclick the swf and click on play, so it’ll move on to the protected part anyway. **

You’re right. Didn’t think of that. But, when you disable the menu, you can’t play it anymore, right ? Or can you ?

Can’t you just lay down some AS at the top of the frame that checks an ‘authorized’ variable (to keep people from just using ‘play’ in the menu)?

[AS]authorized == false ? gotoAndPlay(“block”) : null;[/AS]

I think it was Ahmed that showed me you can put this in the first frame to disable the menu:


Stage.showMenu = false;

That way, if someone just runs the swf file without the HTML or edits the HTML to take that out, it will still disable the menu.

I agree with everyone else, it all depends on how secure you want it to be. If you do decide to use the PHP/MySQL method, heres a tut:
http://www.kirupa.com/developer/actionscript/authentication.htm

Good luck!