A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11255 Flash Movies | 9 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Knife Butterfly
» Title: SkullCandle
» Description: Simple Skull with a candle burning on it.
» More by Knife Butterfly


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 6392 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Cesar Kobashikawa - online portfolio
» Comments: Cesar Kobashikawa's Portfolio


Random Links | Add your own Flash Related Links
Flash Tutorials 1201 Tutorials 7 New Tutorials Added!
What's New | Top100

» FLV Converter for Mac
» After Effects Quality Effect using AS3
» FLV to 3GP: Convert video files from FLV (Flash Video) to 3GP for Mac
» create Christmas business flash presentation with hyperlinks
» Let Photos Show Your Happy Family this Christmas and Upload YouTube
» PowerPoint show to DVD slide show--- PPS to DVD
» How to burn FLV to DVD for Mac
» How to Create Christmas Flash Greeting Ecard with photos and music
» Getting Started In Flash
» Unknown Tag: Title10
Random Tutorial | Add Site

bbm.netBBM.net is designed to save you time and deliver the highest quality royalty-free music for your multimedia projects. Features include: over 450 Music Loop Packages from some of the best composers in the business, our music search engine to speed your selection process, alternate music versions & bonus sounds to use for rollovers or transitions, free technical support and free consulting.

Click here for details »

Web Page Production
Aquent
US-MD-Owings Mills

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Tips_And_Techniques

Categories Password Protected movies
Author: Juan Rosa

 
Page 1
1

Password Protection in Flash

One day I was searching for a way to protect part of my movies so that only does with the password could see my secret area within the movie. I search all over the net for a good password protection system, but couldn't find what I was looking for, so I had to build my own.

I learned in sesame street that it's good to share with your friends. So here I present to you my password protection system.

Note:This password system will only protect the movie until someone takes your SWF and hacked into its actionscript. there are many utilities to do so

Here we go

Movie Setup

Create 4 Layers. Name the first layer "Actions", the second layer "Validate", the third layer "inputform" , and the fourth layer "Text"

The TextField

In the "inputform" layer create a Textfield then open the text options panel (ctrl + T) click on the Text Options tab and set the text type to 'input', the line type to 'password', check 'Border/Bg' and give it a Variable name "pw".

The Button

Create your own or drag one from the Common Libraries (Windows/Common Libraries/buttons). place it in the "inputform" layer

The Actions script

In the "Actions" Layer first frame place this ActionScript:

 stop() 

Place this ActionScript in the button:

on (release) {
 if (_root.pw == null or _root.pw == "") {
 gotoAndStop (2);
 } else if (!(_root.pw == "pass")) {
 gotoAndStop (3);
 } else {
 gotoAndStop (4);
 }
}

The Layers

In frame 2 of the "Text" layer create a static textfield and type (Please enter Password).
In frame 3 place another textfield and type (Wrong Password).
In frame 4 type (Welcome!! you entered the correct password).
And know for the cool part...

The Validation

In frame 4 of the "validate" layer create a circle or something then convert it to a movieclip (F8) After you create your movieclip Place it outside of the stage then right click on it and select Actions from the menu and put this ActionScript into the movieclip:

onClipEvent (enterFrame) {
 if (!(_root.pw == "pass")) {
 _root.gotoAndStop(2);
 }
}

This is the ActionScript that prevents user from going into your protected area without the password. They can get into your protected area just by going forward with the control menu commands or by (Ctrl + right arrow key)

Finishing!

Make sure that frame 1 of the "inputform" layer expands from frame 1 to 3 only.
Make sure that the movieclip in the "validate" layer is at frame 4
Now Test your movie (Ctrl + Enter)

Enjoy!!

1

» Level Basic

Added: : 2002-08-18
Rating: 5.91 Votes: 13
Hits: 2073
» Author
none
» Download
Download the files used in this tutorial.
Download (11 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Symantec Whitepaper: Converging System and Data Protection for Complete Disaster Recovery
Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
  Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Symantec Whitepaper: Comprehensive Backup and Recovery of VMware Virtual Infrastructure
MORE WHITEPAPERS, EBOOKS, AND ARTICLES