First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Gregory Yuzik | Website: http://wickedjester.ods.org

This is gonna be jumbled as its my first tutorial...

Okay...Open a new FlashMX movie.

Create the layer wrong.

Now...I used this for a WebDesign site so people could log in and see their site progress...if thats what your doing, then make a layer for each client. (john doe, jack whack, etc, etc).


[ here I have the 'wrong' layer - the 'WJ' layer (a client) and the 'Layer 1' which will soon have the username/password and login stuff ]

Create an 'Input Text' single line with the variable 'un' (for username - without the ') on the 'Layer 1' layer.

Create a second 'Input Text' with 'Password' selected from the 'Line Type'. Make the variable 'pw' (for password - again without the ') also on the 'Layer 1' layer.

Now make a button and put 'login' or something on it.

Now on the 'Wrong' layer, at the fifth keyframe, press F6 and label it 'wrongpass'. Put some text like 'Ooops - wrong password' or something... Now on the 25th keyframe press F6 again and put this actionscript in:

gotoAndStop(1);

Now the 'Wrong' layer is done.

Now onto the 'WJ' layer...(or whatever yours is) (remember to label it...) On the 35th keyframe press F6 and put whatever content you want to be there...and put this actionscript on that keyframe also:

stop();

Now head back to 'Layer 1' and right click the button you made....put the following actionscript into it:

on (release) {
    if (pw == "hey" && un == "wj") {
        gotoAndStop("wj");
    } else {
        gotoAndPlay("wrongpass");
    }
}
Now, to explain the mother.
on (release) {
    if (pw == "hey" && un == "wj") {
        gotoAndStop("wj");
    } else {
        gotoAndPlay("wrongpass");
    }
}

is pretty much saying 'if the password box has the text 'hey' in it and the username box has 'wj' in it then go to and stop at 'wj' which is where WJ's content will be - or else (if the username and/or password aren't correct, go to and play the label wrongpass.

The reason it's 'play' is because we made the wrongpass have quite a few keyframes, this way it says 'Oops - wrong password' for about 5 seconds then heads back to the username/password prompt...

I think thats it...I'm sure I've missed something, but hopefully this helps...

» Level Basic

Added: 2002-06-11
Rating: 5.01 Votes: 70
(10 being the highest)
» Author
Gregory Yuzik AKA Wicked Jester - 15...
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.