Is a password protection possible on a stand alone player?

  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 10th, 2007, 5:50 pm

I am trying to find the answer through searches, help files etc. It seems clear that there is not a script assist feature built in to do this, but certainly it must be possible through some sort of script that prompts the user when it is first launched. Does anyone know how to do this?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 10th, 2007, 5:50 pm

  • classified
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 23, 2005
  • Posts: 540
  • Loc: Bahrain
  • Status: Offline

Post February 10th, 2007, 9:34 pm

password protection ?
you can always use loadvars and external scripts like php & asp ...

if thats what u mean ...
m0o , where <<Less is More>>
http://www.zainals.com
http://www.zainals.com/blog
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post February 12th, 2007, 7:16 pm

do you only want to do that the first time a user launches a stand alone player? If so you would need to extend flash to interact with the local file system. There's a product called MDM that can do write to the registry, interact with the file system, etc

On the other hand if your ok with the user logging in every time they use your project you could just code a simple login into flash. Don't know how secure you need it to be but a simple if/then statement could serve
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 12th, 2007, 8:33 pm

As you see, I'm pretty much a newbie. I would indeed want to be able to require a password that would activate each time the executable stand alone is launched, but once launched it should not require anymore protection. So the player would launch on scene 1, which would be password protected, then proceed onto scene two when the password is entered correctly. (or something similar) Could someone give me an example of code that would work for this? A simple if/then?

Hey, I'm in Minneapolis too.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post February 12th, 2007, 11:13 pm

place a textbox on your stage, go to Properties panel -> make it Input Text,
name it's instance: input_txt.
Create a button near it, name it's instance: btnSubmit

Then create another layer and a keyframe in it (the keyframe must be a frame where both the textbox and button exists), and place this code inside it:
Code: [ Select ]
btnSumbit.onPress = function()
{
  if (input_txt.text == "mypassword")
  {
      gotoAndPlay("Scene 2", 1);
  }
}
stop();
  1. btnSumbit.onPress = function()
  2. {
  3.   if (input_txt.text == "mypassword")
  4.   {
  5.       gotoAndPlay("Scene 2", 1);
  6.   }
  7. }
  8. stop();
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 13th, 2007, 6:18 am

Beautiful. That is exactly what I needed. Thank you.
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 13th, 2007, 8:21 pm

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler
btnSumbit.onPress = function()

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 15: Statement must appear within on handler
stop();

Total ActionScript Errors: 2 Reported Errors: 2

Does this make sense in relation to the code? I can't seem to get it to work.
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 13th, 2007, 8:42 pm

Would anyone be willing to have me send a FLA to them to see my attempt at creating a password page that does not work?

My email is mockdata at aol.com Send me an email and I will reply with my fla.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post February 13th, 2007, 10:28 pm

1. are you sure you have placed the code inside a key frame and not on a movieclip?
2. what publish settings do you have? you need to publish the flash with action script 2.0 and a version later than 6.0 for flash
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • classified
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 23, 2005
  • Posts: 540
  • Loc: Bahrain
  • Status: Offline

Post February 14th, 2007, 1:05 pm

IceCold wrote:
1. are you sure you have placed the code inside a key frame and not on a movieclip?
2. what publish settings do you have? you need to publish the flash with action script 2.0 and a version later than 6.0 for flash


Code: [ Select ]
: Statement must appear within on handler

stop();
  1. : Statement must appear within on handler
  2. stop();


yeah i agree with point # 1 ...
m0o , where <<Less is More>>
http://www.zainals.com
http://www.zainals.com/blog
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 14th, 2007, 5:37 pm

Yes, I put it on a key frame. Also, I am using Action script 2.0 Flash 8 Pro. Eventually it will be a stand alone (.exe) but the "test movie" is where it is not working. Anyone willing to take a look?
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post February 15th, 2007, 10:27 pm

if u link us to the fla ... probably someone will take a look on it.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • hartzz
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2007
  • Posts: 18
  • Status: Offline

Post February 16th, 2007, 4:22 am

Its not online anywhere. Is there another way to upload it somewhere?
  • BooMoto
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Nov 09, 2006
  • Posts: 40
  • Loc: Ontario, Canada
  • Status: Offline

Post February 16th, 2007, 7:31 pm

http://www.flashassault.com/?id=utiliti ... rification is this what your talking about?
  • stev_ro
  • Beginner
  • Beginner
  • User avatar
  • Joined: Feb 27, 2007
  • Posts: 61
  • Loc: ro
  • Status: Offline

Post March 4th, 2007, 2:56 pm

Maybe this .fla will help you.
http://www.box.net/public/4emyao8h81
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 4th, 2007, 2:56 pm

Post Information

  • Total Posts in this topic: 17 posts
  • Users browsing this forum: No registered users and 48 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.