# Insert password sos!

**URL:** https://forum.kirupa.com/t/insert-password-sos/28928
**Category:** Uncategorized
**Created:** [August 20, 2003, 7:46am UTC](https://forum.kirupa.com/t/insert-password-sos/28928 "2003-08-20T07:46:09Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![flobair](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@flobair](https://forum.kirupa.com/u/flobair)
#### Post date: [August 20, 2003, 7:46am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/1 "2003-08-20T07:46:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 7:59am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/2 "2003-08-20T07:59:13Z")

</div>

I’d say create a new swf, make a [password script](http://www.kirupa.com/developer/flash5/ifelse.htm) and when it’s correct let it load the swf into this one.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 8:03am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/3 "2003-08-20T08:03:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 8:07am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/4 "2003-08-20T08:07:06Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 8:11am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/5 "2003-08-20T08:11:54Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 8:14am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/6 "2003-08-20T08:14:02Z")

</div>

here!

[http://www.kirupa.com/developer/flash5/ifelse.htm](http://www.kirupa.com/developer/flash5/ifelse.htm)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 9:57am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/7 "2003-08-20T09:57:05Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 10:08am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/8 "2003-08-20T10:08:18Z")

</div>

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!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 10:41am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/9 "2003-08-20T10:41:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 10:48am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/10 "2003-08-20T10:48:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 20, 2003, 10:48am UTC](https://forum.kirupa.com/t/insert-password-sos/28928/11 "2003-08-20T10:48:03Z")

</div>

> \*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 ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 29, 2003, 3:31pm UTC](https://forum.kirupa.com/t/insert-password-sos/28928/12 "2003-08-29T15:31:06Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 29, 2003, 8:16pm UTC](https://forum.kirupa.com/t/insert-password-sos/28928/13 "2003-08-29T20:16:28Z")

</div>

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

```auto

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](http://www.kirupa.com/developer/actionscript/authentication.htm)

Good luck!
