Is a password protection possible on a stand alone player?

  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

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?
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

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

if thats what u mean ...
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1827
  • Loc: In the Great White North

Post 3+ Months Ago

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
  • hartzz
  • Posts: 18

Post 3+ Months Ago

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
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

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();
  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

Beautiful. That is exactly what I needed. Thank you.
  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

**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
  • hartzz
  • Posts: 18

Post 3+ Months Ago

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
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

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
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

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 ...
  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

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
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

if u link us to the fla ... probably someone will take a look on it.
  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

Its not online anywhere. Is there another way to upload it somewhere?
  • BooMoto
  • Beginner
  • Beginner
  • BooMoto
  • Posts: 40
  • Loc: Ontario, Canada

Post 3+ Months Ago

http://www.flashassault.com/?id=utiliti ... rification is this what your talking about?
  • stev_ro
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: ro

Post 3+ Months Ago

Maybe this .fla will help you.
http://www.box.net/public/4emyao8h81
  • hartzz
  • Novice
  • Novice
  • hartzz
  • Posts: 18

Post 3+ Months Ago

Actually the link that BooMoto gave me was exaclty what I was looking for. Thanks.
  • BooMoto
  • Beginner
  • Beginner
  • BooMoto
  • Posts: 40
  • Loc: Ontario, Canada

Post 3+ Months Ago

hartzz wrote:
Actually the link that BooMoto gave me was exaclty what I was looking for. Thanks.


No problem thats actually my site, i hope this march break to finish it and upload all my tuts

Post Information

  • Total Posts in this topic: 17 posts
  • Users browsing this forum: No registered users and 1 guest
  • 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.