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.07 Votes: 69
(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: S.Saipriya
» Title: Flash Fire Effect
» Description: This tutorial explains about how to create Fire Effect in Flash of Actionscript 2.0.I hope this tutorial helps you!
Featured Sound Loops
Image for equalize

Audio Player

» Author: Aidan Crouzet-Pascal
» Title: Falling Star
» Description: This loop is a cool sounding, E minor loop.
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: Brandan Paulin
» Description: Epic sounding loop with Brass, Percussion, Strings and Winds. This is actually part of a Loop Pack called the Coming where you can download the rest of the loops that go with it FREE from my website.