Join Login


Video Tutorials
Blog



Host Unlimited Domains on 1 Account

Password Protect Sections of a Flash File


By: RiverCityGraphix      Views: 3676      Share: Bookmark and Share

In this tutorial, you will learn how to password protect sections of a Flash file.

Often there is a section of your Flash site that you will want to keep off limits to your users. By setting up a simple password login you can achieve a private area. Keep in mind that this is not a scalable login system. This is meant to be used for a few users. If you want anything more serious you will need to integrate MySQL with Flash. Overall this is a great little system. Have fun using it!

stop();

submit_btn.addEventListener(MouseEvent.CLICK,passcheck);

function passcheck(event:MouseEvent):void{
if(name_input.text == "Kevin" && pass_input.text == "pass123"){
gotoAndStop(2);
}
else if(name_input.text == "kevin" && pass_input.text == "pass123"){
gotoAndStop(2);
}
else{
error_field.text = 'Incorrect Name or Password';
}
}




Free Source Files Zip