How To Create A Flash Login Screen Tutorial – Part 2
By johnnyb | March 7, 2010 | Posted in Flash | 11 Comments→ Photoshop 3D for Animators: The complete guide to learn 3D and animation in Photoshop CS5. Pre-order this book now with %22 discount here.

The last tutorial I showed how to to create a simple flash based login just using actionscript. A visitor has asked “how do I modify this to go to a web page instead of a different scene?” So this is the topic of today’ s tutorial, and the solution is very simple!
Before continuing reading this post did you already join our Twitter and subscribe to our RSS feed? If not, rush and join us now to receive updates of new posts and free resources.
I could of course use all the graphics on the last tutorial, but instead I am going to use a different set.
If you are not familiar with the URL Request from the flash.net package, please see the flash docs
open flash CS 4, create a new AS 3 file

First lets create all our layers (notice the layers are bottom to top)
- background
- display
- input
- button
- labels
- actions
Your layers should look like this

background player – I changed the stage to 240 px X 125 px with a gray background (#CCCCCC). On the background layer, use take the rounded rectangle tool and create a background covering most of the stage. I am using black for the fill. The size is 220px for the width and 110 for the height, centered on the stage to leave some of the gray background as a boarder. Convert to a movieclip and call it background. lock the background layer.
display layer - Use the text tool and create a dynamic text field for the message (either error or success), give it an instance name of display_txt. I am just using Verdana text so you should this text on your machine. I am us a blue font color (#0099CC). yes I know it is for an error message as well, but nobody says it has to be red. I just like this color, but feel free to change it. Don’t forget to embed your font!
button layer – using the rounded rectangle tool create a box for the button. I used a size of 50 px X 16.7 and used a gray gradient fill. Use the text tool and in the center write “LOGIN”. convert to a movieclip and call it login_mc. This movie clip is your button, and give it an instance name of login_mc.
input layer – take a text input component (username field) and drag it to the stage, the dimensions will be Width-135 Height-16.4 and a X location- 86.05 and a Y location-40.05 give the input field an instance name of name_txt. Leave as single line in the behavior option. Take another text input component(pssword field) and drag it to the stage, the dimensions will be Width-135 Height-16.4 and a X location- 86.05 and a Y location-61.05 give the input field an instance name of pass_txt. Also be sure to pick the password type in the behavior option.
labels layer - Using the Text tool write a header for the application “Client Login” the dimensions will be Width-153.95 Height-19.0 and X location- 67.05 and Y location-18.8. Using the Text tool write “username” to the left of the username text input the dimensions will be Width-65.0 Height-16.0 and a X location- 20.05 and Y location-40.25. Using the Text tool write “password” to the left of the password text input the dimensions will be Width-73.0 Height-16.0 and X location- 10.05 and Y location-61.25.
The interface is now done and you should have

actions layer - (right click in the first frame and open actions panel)
first we will be adding a stop action so the movie does not continuous play, then setting up the event listener for the button.
so when the user clicks on the button a loginUser function is called.

Now in the loginUser we checked to see if the user entered the correct username/password combo, and if this is is true, a success message is displayed,
and the website is launched.
I am using:
usename -graphic
password -mania
On success the main page of graphic mania is launched.
I think that navigateToURL is clear, but ask any questions if not.
In general it is of the form:
navigateToURL( new URLRequest(“some web page”), “opening options”);

Check to see if the username/password was not entered correctly, and display a error message to the user.

that is it, if you have any questions about this tutorial, please leave a comment or contact me. By the way if you are looking for a much more advance login tutorial I am working on one for my blog, which involves flash remoting & Coldfusion, there will be a link to this example later and will update the article with it.
you can download the source by clicking on the folder above!
Happy Flashing`-`
Johnny
11 Comments to “How To Create A Flash Login Screen Tutorial – Part 2”
Post comment
| Follow on Twitter | Subscribe: RSS | Email | ||
|
|
|||
Pages
Resources News
- Matte Painting Tutorial of Tajmahal Using Photosho…July 22, 2010
Traditionally, matte paintings were made by artists using paints or pastels on large sheets of glass for integrating with the live-action footage. The first known matte painting shot was made in 19…
- 14 Features You Need for Your WordPress ThemeJuly 22, 2010
WordPress has become the hottest blogging platform on the market. However, due to the fact that blogging has become such a huge success, having the right features for your blog is paramount to succ…
- Pxleyes Top 50 Photoshop Contest Pictures Of June …July 22, 2010
The 50 highest scoring entries from the Pxleyes photoshop contests that were active during the month June 2010.
- Fresh Floral and Angels Vector Packs from Designio…July 22, 2010
In the past weeks we have been busy working on some fresh premium floral and angels vector packs that will simply blow your mind! They are available now for download on Designious.com. Check them …
- 40 Stylish Typographical Wallpapers for Helvetica …July 22, 2010
Helvetica is one the most popular type-face since 1957.Yes it’s been more than 50 years and developed by a Swiss typeface designer Max Miedinger and Eduard Hoffmann.Where ever you look,you can de…
Useful Links





















How to Create Login in Flash Tutorial | Flash, Design, Vector … by Flash Designers says:
[...] View post: How to Create Login in Flash Tutorial | Flash, Design, Vector … [...]
How to Create Login in Flash Tutorial | Flash, Design, Vector … | My Money and Finance Blog @ Smrits says:
[...] the original: How to Create Login in Flash Tutorial | Flash, Design, Vector … Share and [...]
logolitic says:
very nice tutorial, very useful, thank you I learned something new.
.-= logolitic´s last blog ..Eye manipulation tutorials in Photoshop =-.
Re: Use PS3 controller on PC Tutorial : World online games review says:
[...] How to Create Login in Flash Tutorial | Flash, Design, Vector … [...]
johnnyb says:
@logolitic Thanks!, and no worries I am glad that you liked it, and learn something new`-`
.-= johnnyb´s last blog ..Remoting Login & ColdFusion =-.
Alkallinuig says:
thank!
How to Create Login in Flash Tutorial | Flash, Design, Vector … | Drakz Free Online Service says:
[...] the rest here: How to Create Login in Flash Tutorial | Flash, Design, Vector … Share and [...]
johnnyb says:
@Alkallinuig you are very welcome I am glad you like it`-`
.-= johnnyb´s last blog ..Remoting Login & ColdFusion =-.
Emanuel Torres says:
Excelent tutorial!! thank you very much!!! now I have a question… how can i use this example for more than one user??
johnnyb says:
@Emanuel Torres add more functions for each user. it would be better using a switch statement instead of if/else. I could do an example for you if you want.
.-= johnnyb´s last blog ..FDT Remoting Template =-.
Jaythomas says:
is there a way to have multiple logins that point to specific directories with out using cold fusion. The sample log in work great but I have several users that need to access different directories. Each user log in would point to different directory…. HELP!!!! please.