Flash Secure Login

1 post Page 1 of 1
Contributors
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Flash Secure Login
hungryhounduk
Log in
Image

Log in Unsuccessful
Image

Log in Successful
Image

How your Timeline should look
Image

Hi All
Here is another Flash Tutorial on how to make secure login page or whatever you like using the example below.


**These 4 pics above are just an example i have made in Flash and added (1) to a HTML Page in Dreamweaver MX, If they dont know your password then they WILL NOT GET IN cooll; as if you do it my way then the Flash file gets loaded into the same flash file as the first ( if that makes sense ;) ) so there is no other HTML Doc only the one page which makes it secure...and they cant download the Flash files if when you publish the flash files you set the NO IMPORT in the Dialog box...

Ok lets get Flashing cooll;


Start Flash

Create 2 Textbox's on a Layer
1 Input Textbox ( instance name= inputName)
1 Dynamic Textbox ( instance name = inputStatus )

Put 2 Buttons on a layer
Button 1 ( enter ) on frame 1, Press F5 on frame 9 ( this creates frames up to frame 9)
Button 2 ( Go back to the first frame ) on frame 10, insert Blank Keyframe at frame 10 and place a button on the buttons layer at frame 10( when the Login Button is pressed the Playhead will go to frame 10)

Login Button Code( select the Button and Press F9 to open the Actionscript window and paste or type the code below in.)
Code: Select all
on (release) {
	gotoAndStop(10);
}
Retry Button Code ( select the Button and Press F9 to open the Actionscript window and paste or type the code below in.)
Code: Select all
on (release) {
	gotoAndStop(1);
}
Create a New Layer called actions
On the Actions Timeline ( Actions Layer ) put a stop action at frame 1

Add a Keyframe at FRAME 10 AND Put this code in Frame 10 of the Actions layer( select the Frame and Press F9 to open the Actionscript window and paste or type the code below in.)
Code: Select all
password = inputName
if (password == "whatever you like") {
	inputStatus = "Access Granted!";
	loadMovieNum("", 0);
	loadMovieNum("WHATEVER .swf", 0);
} else {
	inputStatus ="Access Denied!";
	
	
}
* Summary
If Button 1 is pressed then this tells flash to gotoAndStop at frame 10, which will activated the code checking that our Password is correct.
If the Password is not correct then on frame 10 you will get a ACCESS DENIED Message and a button will appear to take you back to frame 1 to retry to login.

** If the Password is correct it will load the 2nd Swf file into the first cooll;

any probs just give me a shout :)

enjoy

Chris
Image
1 post Page 1 of 1
Return to “Tutorials”