ActionScript 2.0 :: Code For Multiple Passwords (if/else)?

Mar 9, 2009

I found a Kirupa code for creating a password:

if (password == "kirupa") {
inputStatus = "Access granted!" ;
} else {
inputStatus = "Access denied!" ;
}

I'm wondering if it's possible to modify this code so it can accept multiple passwords, with each correct password offering a different action.

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Have Multiple Passwords Instead Of One

Jun 14, 2005

I am working on a client log-in page, and I would like to have multiple passwords instead of one. This is the code I am using:

password = inputName
if (password == "kirupa") {
inputStatus = "Access granted!" ;

[Code]....

I have tried making two action frames and on this: if (password == "kirupa"){ I just did this: if (password == "kirupa""WandMan""Lizrds""Foz"){

View 8 Replies

Setup Multiple Passwords For One Result?

Mar 18, 2010

Below is my code and it is working. What I need to know is how to setup multiple passwords for one result. So look at the first four actions.. they go to the same page. I also want it to go if it is small caps verses large. How do I put all in one statement or do I have to do it this way. How do I put this in a text file if I have multiple passwords going to different pages. So as you see below if they put in password1,PASSWORD1,cash,CASH this all goes to page1.html If this put in password2,PASSWORD2 it goes to page2.html[code]...

View 1 Replies

ActionScript 2.0 :: Multiple Passwords In One String?

Jan 29, 2011

I have a simple kids game where they need to enter a password to move on in the game. The password is a string "Explore solutions and plans".I would like them to be able to move on if they have it partially right; e.g. if they type just "explore" or "Explore" or "Explore solutions" or "Explore plans" etc. Current script:

stop();
var myPassword:String = 'Explore solutions and plans';
submit_btn.onRelease = function (){

[code]....

View 5 Replies

ActionScript 2.0 :: Use One Input Field And Have Multiple Possible Passwords

Dec 19, 2007

I'm trying to create password protection something like this site's:[URL]..I've tried looking up tutorials, but all I can find are ones that tell me how to create one password for one movie. What I'd like to do is use one input field and have multiple possible passwords that would take you to their corresponding movies.

View 1 Replies

Actionscript 3 :: Using A For Each Loop To Check List Of Possible Passwords?

Apr 6, 2012

What am trying to do is match an Array of possible passwords to the correct password and trace if the password is correct or not. This is what I have so far.

var passWords:Array = ["catdog", "fatcow", "yoda", "petergriffin"];
var userPassword:String = "petergriffin";
var wrongPassword:Boolean = false;

[Code].....

View 1 Replies

ActionScript 2.0 :: Shared Objects As User Passwords?

Aug 17, 2006

flash site that has a login screen...i used Shared Objects to allow the user to save their password when they visit the site (like cookies)...this all works fine...however, to save you all from an exhaustive explanaition of why i did this, there is a log-in page for EVERY individual page on the site (there's roughly 20 in all).this way, when the user clicks Log In, it takes them to the specific page they are requesting, instead of just defaulting to the home page (god i hope that made sense).

so here's the issue:for some reason the user info is only being saved on a page-by-page basis...meaning, that if the user clicks to the photos page, logs in and then closes their window...then later, clicks to some other page, their info is not retrieved on this new page...i understand that i am using different flash files for each log in page, but its the same script referencing the same shared object (which from what i see creates a .txt file), so it seems like it should workhere is the code:first frame:

Code:
stop();
user_so = SharedObject.getLocal("user");

[code]......

View 1 Replies

ActionScript 2.0 :: Save Usernames And Passwords For The Modules?

Mar 28, 2004

I have been trying to save usernames and passwords for the modules i develop in flash ......and finally i came across sharedObjects which really come in handy for saving information on local machine.........

Now comes the problem ........the data is stored in the form of *.sol files by flash and now i am unable to add data to previously saved information.....Is there any way to save data in sol files as an array the thing is i need to develop a login screen for multiple users not for single user ...........

View 2 Replies

ActionScript 2.0 :: Dynamic Textbox To Randomly Show Set Passwords

Mar 9, 2011

I have a password engine already made. But I got this idea of making 3 different passwords each time the game is being played. I already achieved to set these 3 password and the Input textbox accepts them. The thing is when the game ends, it give a password for another game. I want to set that dynamic text box that give you the password to randomly shows one of the 3 passwords I've set. So, how do I make a function that everytime the game is being played,set a different text on the dynamic text box, from one of the 3 passwords I've set?

if (youHelpMe == true) {
iWill.Helpyou(For_Sure)
} else { GAME.OVER }

View 2 Replies

ActionScript 3.0 :: Navigate To Scenes Using Passwords And A Submit Button

Mar 20, 2010

I'm using AS3 in timeline. I have an input text box and a button. I would like to navigate to scenes using passwords and a submit button. On timeline I have four labels: intro_1 to intro_4. The input text box is called main_sections. The submit button is called main_btn. Both text box and button are on a layer that goes from intro_1 to intro_4. PROBLEM The only scene I can go without errors is section_4. All other scenes show error

[Code]....

View 1 Replies

ActionScript 3.0 :: Making Exam Login - Input Username And Passwords

Jan 14, 2012

I tried to make an exam and I came up with a few issues. The exam is located here: [URL]. One problem is that I don't know how to make the login and input usernames and passwords. How do I make the Start Exam button work so when an appropriate username and password are entered it takes you to the test.

View 11 Replies

ActionScript 2.0 :: CS3 Create A Password Input Area Where A Player Can Insert Several Passwords And Be Correct

Mar 21, 2010

I'm trying to create a password input area where a player can insert several passwords and be correct, each password triggering the typing of that password in a separate area (which is what the numbers one to ten in the script below refer to). However, there is some flaw I can't find in the script and if I try to enter anything in the box, it is changed to "orangemarmalade" (see below) and only enters there (acting as if I typed "orangemarmalade" every time).

[Code]...

View 3 Replies

ActionScript 2.0 :: Multiple MovieClipLoader Code?

Dec 1, 2005

I came up with the following thumbnail generator code and I tried to attach a ovieClipLoader to each one but it sems to only work for the last generatedthumnail...I'm kindda' new to this This is the part of the code that generates the thumbnails:

Code:
function thumbnails_fn2(k){
movie=this.attachMovie("Mthumb", "Mthumb"+k, k);

[code]....

View 12 Replies

ActionScript 2.0 :: Multiple Mc's Using Same Tween Code?

Jun 11, 2010

I have 10 different movie clips that I all want to use the same tween code

Code:
function grow(who) {
var tw:Tween = new Tween(who, "_xscale", Strong.easeOut, myMovieClip_mc._xscale, 92, 1,

[code]....

View 3 Replies

ActionScript 2.0 :: Way To Run The Same Code On Multiple Instances?

Dec 16, 2010

I'm creating a navigation menu, as the cursor hovers over each of the menu items I want them to behave in a certain way. They all behave the same way but obviously the text is different.. So basically I was wondering what's the best way to apply the same code to multiple instances, without repeating the code?

View 4 Replies

AS3 :: Code In A Single Frame Or In Multiple Frames

Jul 25, 2011

I have a button that I want to work on multiple frames. Currently, I have a scene that automatically starts to play when the playhead enters the first frame (no stop command). I have an event listener in the first frame that listens for a click. After the click the user is supposed to go to another scene.

The problem is that the button is not working. I am assuming that the code in the first frame only applies to the first frame and I need to add additional code that applies as the playhead is playing across the multiple frames.

[Code]....

View 2 Replies

ActionScript 3.0 :: Controlling Multiple Mc In One Line Of Code?

Feb 5, 2009

I want to tween multiple mc with ONE line of code like this one (know its not right but youll get the idea):

var move:Tween = new Tween ( (one_mc, two_mc, three_mc), "x",
Back.easeOut, 0, 100, 1, true);

I tried this when my mcs are on the stage using instance names:

new ensemble:Array = new Array (one_mc, two_mc, three_mc);
then
var move:Tween = new Tween (ensemble, "x", Back.easeOut, 0,
100, 1, true);

I then tried this using linkage (LK) name:

new ensemble:Array = new Array (oneLK, twoLK, threeLK);
then
var move:Tween = new Tween (ensemble, "x", Back.easeOut, 0,
100, 1, true);

None of those worked.

View 3 Replies

Professional :: Load Multiple Swfs Using The Following Code?

Aug 28, 2011

In actions for Frame 1:
var myrequest:URLRequest=new URLRequest("A.swf"); var myloader:Loader=new Loader();myloader.load(myrequest);img1.addEventListener(MouseEvent.CLICK,

[code].....

View 7 Replies

ActionScript 3.0 :: Apply Code To Multiple Objects?

Dec 26, 2010

im trying to use a use a code segment that makes something avoid the mouse. My issue is the code requires that iff i have more than one object that i want to avoid the mouse than i need to make a new set of variables for the second object and pretty much copy the code than change the variable names. Thats all great and dandy but i have a couple hundred very small objects that i need to avoid the mouse. is there any way to maybe apply the code to each object with an onclipload maybe?

ActionScript Code:
import flash.events.Event;
stage.addEventListener(Event.ENTER_FRAME, fun);
function fun(event:Event) :void {

[code]....

as you can see the object i want to move requires its own variables and 2 if statements. and i REALLY dont want to have to copy/paste that code over 200 times and make a new set of variables for each object. maybe i could apply the code to the object itself ? but than what would i name the variables?

View 7 Replies

ActionScript 2.0 :: Extend Code To Multiple Lines

May 14, 2007

the symbol (or pair of symbols) to extend a line of code to multiple lines? For example, rather than this:

[Code]....

View 2 Replies

ActionScript 2.0 :: Code To Generate Multiple Moving Barriers?

Mar 31, 2010

So I have a simple game going now with a character running forward and I have to jump and duck under barriers. I was able to make it all work so that one of my three random barriers I made comes at a random time at you. However, I don't know how to make it so that multiple barriers come at you. I feel I need some sort of loop. How should I alter the code I have already? This is on one of the barrier moveclips, the first part sets the platform and position to come at you and the second part moves that part towards you. P.s. this is in cs4.

[Code]...

View 1 Replies

ActionScript 3.0 :: Possible To String Multiple Sound Files Together Using Code?

Nov 18, 2009

Say I recorded and imported sound files of my voice saying "Two",  "Four", "Equals", and "Plus"Would it be possible to have Flash on click string together those sound files like a string so that the user would hear:

View 1 Replies

ActionScript 3.0 :: Code For Multiple Movieclips To Move In Unison?

Jun 28, 2010

I have 3 main movieclips with roughly 100 other related movieclips that I need to move together frame per frame. For example main movieclip1 has about 100 frames.  If main movieclip 1 is on frame 3, I want movieclips 4, 5, and 10 to also be on frame 100  I think the code may involve an array with forEach function.

View 1 Replies

Actionscript 3 :: Flash Assigning The Same Code To Multiple Instances

Mar 4, 2011

im new to flash actionscript and i am trying to create a very simple game. in this game i have about 50 walls that i want to stop the player if they collide with it. i cant figure out how to assign the same code to multiple instants and im still fuzzy on alot of the terms flash programmers use but im learning.on an unrelated note i am also having the player push the ball and when i add a collision.block to the ball when it hits the wall it goes right through it because of the ball repositioning itself based on the players location.

View 1 Replies

ActionScript 2.0 :: Attaching Code To Multiple Buttons Cleanly?

Feb 24, 2006

I have a series of buttons, and I want the same code applied to them all, to handle rollover states etc... Normally I'd do this useing registerClass, but in this case the buttons are added to the stage manually so I can't.I could do somehting like this:

Code:
home_btn.onRelease = news_btn.onRelease = about_btn.onRelease = function() {
// do something

[code].....

View 1 Replies

ActionScript 3.0 :: Reading Multiple Flashvars In Swfobject Embed Code

Aug 28, 2009

This code is giving me undefined. I have 3 flashvars in the swfobject embed code in the HTML document. How do I fix this?[code]

View 3 Replies

Flash To Have Multiple Objects With The Same Instance Name All Being Affected By One Piece Of Code?

Oct 6, 2009

I tried something interesting recently. I had code effecting an object with the instance name : object_mc.Now I added another object and gave it the same instance name.The result was, that the code only effected the most recent added object (no error).Is there a way in flash to have multiple objects with the same instance name all being affected by one piece of code?

View 5 Replies

ActionScript 2.0 :: Altering Code So One Object Can Drag To Multiple Targets

Jun 6, 2011

how I could create a simple drag and drop. So far I am able to get one drag_mc to go to one target_mc. Howver I would like to know how I could change the code so that drag_mc could have multiple targets?

[Code]...

View 0 Replies

ActionScript 2.0 :: Multiple Collision Detection Code For A Platformer Game

Dec 15, 2002

I'm having a problem with my multiple collision detection code for a platformer game.. It checks for collisions on all objects separately and it checks only one object per frame. I need to make somekind of a loop so that it would check every object in one frame. Anyone got an idea? It's coded like this:

[Code]...

View 4 Replies

ActionScript 3.0 :: Adding Multiple Movieclips To An Array (in One Line Of Code)

Mar 6, 2009

Code:
var menuArr:Array = [home_mc, menu1_mc, menu2_mc];

when I iterate with a for loop to add event listeners

Code:
var i:uint;
for (i=0; i<menuArr.length; i++)
{

[Code].....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved