ActionScript 2.0 :: Can't Get A Simple If/then Statement Working With An Input Text

Feb 19, 2005

i cant seem to get a simple if/then statement working with an input text. Here is my AS

[AS]
on (release) {
password = inputName
if (password == "test") {

[Code].....

For some reason when i type in test in the movieclip inputName it still sends me to ign.com. Everything is in the same frame and i just cant get it working.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Simple If Statement Not Working?

Feb 21, 2012

I am attempting to create one function to respond to multiple button clicks. I have a simple if statement in my onBtnClick function that does not work. Just need the button that is in that variable to go to frame 1. Trace statements are working inside the statement so I the if statement runs correctly?

[Code]...

View 3 Replies

ActionScript 2.0 :: If Statement: Empty Input Text?

Jun 3, 2004

want to check if an input text field is empty.I only managed to do it this way;

mytext = textfield.text;
if(mytext != "") .....

The problem with this approach is that I also want to exclude variables with whitespaces.I tried; if(!isEmpty(mytext) ).....

View 11 Replies

ActionScript 2.0 :: If Statement: Check If An Input Text Field Is Empty

Jun 3, 2004

I want to check if an input text field is empty. I only managed to do it this way;

mytext = textfield.text;
if(mytext != "") .....

The problem with this approach is that I also want to exclude variables with whitespaces.
I tried; if(!isEmpty(mytext) )..... but that didnt work.

View 11 Replies

ActionScript 2.0 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 2.0 :: AS 2.0 - Simple If/else Input Text Quiz?

Oct 17, 2009

I have a question regarding an if/else statement I am creating for a simple quiz test in Flash ActionScript 2.0. I have the .FLA file attached. main stage I have the following: of "yes" and "no" with keyframes to jump a message to the user about if their answer was correct or notMy button has the following script:

on(release) {
if(vAnswer == "yes"){
gotoAndPlay("yes");
}else{

[code].....

Am I not doing this correct? Everytime I type yes into the input box, it jumps me to my "no" label. I have researched, and I am doing something so simple and wrong, but I can't figure it out for the life of me.

View 14 Replies

ActionScript 2.0 :: Incorporate A Simple Comment Box In Which Users Can Input Text?

Dec 12, 2010

I'm trying to incorporate a simple comment box in which users can input text and view all the text others have put in. I am struggling! I used a guestbook tutorial and it is going nowhere.

View 0 Replies

ActionScript 3.0 :: Input Text Not Working?

Aug 4, 2011

I am working on a budget project where users input text (numbers) and it is automatically added. The swfs works great, but when I export an exe it does not work. Users can delete the "0" that is there, but can not type in anything. I've embedded the font. I also had a exe that externally loaded the swf, but it still did not work. I'm attaching my code.

Actionscript Code:
import flash.events.Event;rent.restrict = "0-9";util.restrict = "0-9";gro.restrict = "0-9";toi.restrict = "0-9";car.restrict = "0-9";gas.restrict =

[Code].....

View 1 Replies

ActionScript 1/2 :: Variable On Input Text Not Working With If / Then?

Mar 25, 2009

I'm using ActionScript 2.0 with Flash CS4 Professional, andI'm running into conflicting info on how to do this depending onwhich Flash book I'm looking at (and is that really a surprise?).1) I want the user to type text into a text field and thenFlash places what they've typed into a variable.So I created a text field of the type 'Input Text' andassigned this variable 'myInput'2) When the user presses a button, I want Flash to look atwhat is in the variable. THEN... If they have typed the correctword, they are sent to frame 19. If they type anything else, theyare sent to frame 38.In this example, the correct word is: "move"So, I placed this script on the button:

on (release) {
trace(myInput);
if (myInput = "move") {

[code]........

View 4 Replies

ActionScript 3.0 :: Input Text Box Components Not Working When Loaded?

Apr 20, 2011

I have a main movie that loads a child movie clip. The child movie clip is a security access movie with 2 input boxes (standard input box components). When I run the child movie on its own the input boxes work fine.When I load the child movie from the main movie input boxes do not allow me to write in the input boxes. The cursor remains blinking inside the component but does not respond to keyboard.This is the code in the main movie that loads the child:

security.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, fsecurity);
function fsecurity(e:ContextMenuEvent):void{var loadera = new Loader();addChild(loadera);loadera.load(new U

[code].....

View 11 Replies

ActionScript 2.0 :: Input Text To Array Variable Not Working?

Jan 12, 2008

I am working on a line rider/ free rider style game in flash (which is coming along quite nicely ). For the whole night I've been trying to create a way to save and load data simply off text and have finally come up with a basic solution for it! I have my information all stored into an array neatly to be later used with the function lineTo upon load. My problem here is that when I actually input the data into the textbox to be picked up by the load button it does not draw the lines like its supposed to.My load button has the following code:

onClipEvent (enterFrame) {
onRelease = function() {
var points = new Array(_root.xInput);[code]......

View 2 Replies

ActionScript 1/2 :: Input Text Filds Not Working When Fullsceen Mode In Browser?

Sep 20, 2011

Input text filds not working when fullsceen mode in browser

View 1 Replies

ActionScript 2.0 :: Simple If Statement Won't Work?

Feb 18, 2006

I am using Flash 8, and for some reason, my if statement won't work. I have a scrollbar which scrolls a movieclip (that contains AS loaded material (eg. attachmovie). I want it so that only when the material is longer than the scrollbar do I see the scroll bar.For some reason, it doesn't work. The traces don't even work!

if (scrollbar._height < menu_mc._height) {
scrollbar._alpha = 100;
trace("works");[code].....

View 2 Replies

ActionScript 3.0 :: Simple Hide / Show Movie With If Statement?

Nov 24, 2010

I need something like this (not correct code!)

if (MovieClip(this.root).myimage.x -= 100{
MovieClip(this.root).mybutton.visible = false;
} else {
MovieClip(this.root).mybutton.visible = true;
}

So I'm saying if myimage x position in less than 100 hide mybutton.

View 6 Replies

ActionScript 3.0 :: Check To See If An Object Exists By Using A Simple If Statement?

Sep 27, 2010

I'm trying to check to see if an object exists by using a simple if statement.
 
if (object.name) {
//Do this
}
 
However, if the object doesn't exist, I get this error, "Error #1010: A term is undefined and has no properties" - which I understand is because the object doesn't exist. Is there a better way to check to see if an object exists?

View 1 Replies

ActionScript 2.0 :: Simple Timer - Delay For 20 Seconds (IF Statement)

Apr 19, 2004

I'm building a continous move in flash, and I'm displaying some text and images and want to hold the timeline for about 20 seconds and then resume play again. I'm trying to write a simple timer in AS to keep from having to create 10000 frame long movie clips. Here's what I have so far:

stop();
this.onEnterFrame {
time = getTimer();
if (time == 20) {
play();
}}

Unfortunately, this isn't working for me, and 'm unsure why. I suspect two things,
A: my "time" var takes only a snapshot value of the timer and not a continuous value, so the timer never reaches the value of 20. Or,
B: I have somesort of syntax wrong and the if never gets a chance to load.

View 4 Replies

ActionScript 2.0 :: Make A Simple SWITCH Statement With Button._name As Variables?

Jun 18, 2007

I want to make a simple SWITCH statement with Button._name as variables for CASE

so i got this code:

Code:
Button.addListener(_root);
_root.onRelease = function() {

[Code]....

View 2 Replies

ActionScript 2.0 :: Default Dynamic Text Auto-scale Font, Input From Input Text First

Feb 3, 2011

I have an issue with font scaling of a dynamic text box.

Currently i have one input box named input_1 with a variable attached to it named "choc_1".

Also, i have a dynamic text box named dynamic_1 with variable "choc_1".

When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.

auto scale-size the fonts to a smaller size if the user types many letters.

The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.

here's a code that i'm trying to fix but i can't get the dynamic box to change:

[Code].....

View 1 Replies

ActionScript 2.0 :: Dynamic Text Auto-scale Font, Input From Input Text First

Feb 3, 2011

I have an issue with font scaling of a dynamic text box.

Currently i have one input box named input_1 with a variable attached to it named "choc_1".

Also, i have a dynamic text box named dynamic_1 with variable "choc_1".

When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.

I've googled a lot, but i can't find a solution to auto scale-size the fonts to a smaller size if the user types many letters.

The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.

here's a code that i'm trying to fix but i can't get the dynamic box to change:

[Code]....

View 0 Replies

ActionScript 2.0 :: Nested If Statement For TextField With User Input?

Mar 16, 2012

I have the following function
ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
proof_txt._visible = true;
} else {
proof_txt._visible = false;
}};

This dynamically on/off the description. I have one text field where user enter the values, If this value is =>1501 then i want to display it true. I am trying like this and getting error.

ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
if (check_amount_mc.text ==> 501) {
proof_txt._visible = true;
}} else {
proof_txt._visible = false;
}};

View 2 Replies

Flex :: Text Input With Icon Inside Like Mac Os X Search Text Input

Mar 24, 2010

I'm trying to extend the text input that comes in flex to support an icon, just like mac os x search text input has a grey circle aligned to the right, the text input has a addChild method, but it didn't work for me.

View 2 Replies

ActionScript 2.0 :: Input Text Box To Dynamic Text Output - No Cursor, Can't Input?

Apr 28, 2011

the last of many problems, is that at the very end of the test, you're shown your score, and you have the option to type your name in a text box and click "save". Doing so will apply you score data (time elapsed, date, correct answers and percentage) along with the name you typed in, and output in a form, that you can save or print off, or whatever. The problem is, the input text box will not let you type in it. If you mouse over it, the mouse stays a pointer, you don't get the text tool. If you click on it, the cursor appears for a split second after you release the mouse button, but you cannot type anything in it.This is the actionscript for the output form:

Code:
//
function saveRecord(record:String, field:String, now:Object, score:Object):Void {

[code]......

View 3 Replies

ActionScript 3.0 :: Inputbox.text = "" Isn't Working On Input Textboxes

Aug 2, 2010

I have an input textbox on the stage and I can't seem to set its text when I do

Code:
inputbox.text = "A";
inputbox.appendText ("A");
inputbox.htmlText = "A":

The idea is when I click on a movieclip I want the input textbox to show the value of one of that movieclip's properties. Then I can change the value using the textbox if I want to.

View 2 Replies

Professional :: Make Simple Input TextFields?

Aug 10, 2010

I open up Flash CS5 and make a simple INPUT TEXTFIELD. I run the program, and I can't even use all the characters. It is under ARIAL font. This is literally destroying my soul. Look, if I want to embed fonts, I will embed fonts like in CS4. What is the crazy idea that now we have to embed every font we want to use? Is that how this is going? If I want to use ARIAL, I literally have to embed it? Did APPLE get their hands on Adobe developers and do something seriously this sick to the CS5 world?
 
I want to make simple input textFields like in the past, without having to embed fonts.

View 5 Replies

ActionScript 2.0 :: If Statement Is Not Working?

Jun 22, 2010

on my main timeline i have a movie clip called "screen" within that i have a dynamic text box for inputing a number. var for text box is txt_1

on the same timeline i have another mc called "animation" withing that i have a mc called "prizes" there are 2 animations in the prizes movie clip that are supposed to run based on the if statement...i have an action assigned to the prizes as below:

//this.onEnterFrame = function () {
if (_root.screen.txt_1 == "11111") {
prizes.gotoAndPlay('prizes1');[code]........

but this is not working...basically i want to say that is the text that was inputed was "11111" play the first prize animation inside the "prizes" mc, and if its "22222" play the second prize animation in the "prizes" mc.what am i doing wrong?

View 7 Replies

ActionScript 1/2 :: If Else Statement Not Working

Jul 30, 2009

I'm sure I have the conditions and statements typed in wrong. Here is the original code:[code]only now I want to add an if/else statement so that if none of the mouseDown conditions are met, it then goes the the Timeout variable:[code]

View 2 Replies

ActionScript 3.0 :: If Statement Not Working/being Run?

Nov 25, 2009

I have a button which makes a panel flip 180 on the x axis if its name is not in an array called "panes", it determines this by running an if statement. If its name is in the array then the button should run some code to make the panel flip back. However it isn't. It will let the panel flip one way, but doesn't run the code to flip it back. I was wondering if someone could take a look a see if they know why.

View 4 Replies

ActionScript 2.0 :: If Statement Not Working?

May 28, 2005

For some reason my if statement is not working. It is in a movie clip of a blinking eye and I want the code to pause the blink for 4 seconds between blinks.The movie clip does not have an instance name (which may be the problem).Frames 1-12 is the eye blink animation. (no script)

Frame 13

Code:
timeDelay = 4+getTimer()/1000;
Frame 14 is empty

[code]....

When I run the movie, the varaibles change like they should according to the time, but for some reason, it skips over the if statement even is timeYet is greater than timeDelay. I probably labeled the variables wrong, but I do how they should be.

View 2 Replies

ActionScript 2.0 :: For Statement Not Quite Working?

Jan 4, 2006

ActionScript Code:

</p>
<p>function flasher () {</p>
<p> trace ("flasher running");</p>
<p> count = 20;</p>

[code]....

If i am right this should make win11 flicker 4 times but it aint:confused: I dont need to use a onEnterFrame for this do i?

View 14 Replies

ActionScript 2.0 :: Else If Statement Not Working?

Aug 9, 2006

Here's my code:

Global variable _level0.menu_2 is populated with one of 5 values. Function exists for each value. The function for the value should only be called if the _level0.menu_2 variable matches the value. What is happening is that even though _level0.menu2 is correctly populated, only the first if statement executes--even if the first condition is NOT met.

I looked all around and can't figure out what's wrong. As far as I can tell (and I've been over the code character for character) the syntax is correct.

function loadMenu2():Void{
if (_level0.menu_2 = value1){
trace("_level0.menu_2 is value1");
value1();

[code]....

View 2 Replies







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