ActionScript 2.0 :: Checking Input Box Data For Specific Phrases?

Jan 10, 2006

I'm developing a diet checker that users enter their recipe into an input field and compares it to an external text file with a list variables of ingredients and then underlines or highlights certain ingredients that would not be good to eat.

I need to check this input box for certain words and see if there are specific words before or after those words.The word "egg" WOULD BE highlighted/underlined as a bad ingredient but "egg white" would NOT have the "egg" part highlighted The word "fried chicken" WOULD BE highlighted/underlined but "baked chicken" or "broiled chicken" would NOT be highlighted The external variable text file lists the words I'm searching for and the words to replace them with but, the code I have cannot yet determine if the word "white" is after the word "egg" and then not have the "egg" part of the phrase underlined.

View 2 Replies


Similar Posts:


IDE :: Checking An Input String?

May 15, 2009

I do math applications for the web. Often I have to check if a user input is correct. For example: the right answer is 3x+5. Is the user input that.I do this by checking character by character. I don't think that it is the best way, especially since the user may have written 5+3x, which is right, too, although it is preferred to write the other way around.I sometimes have to check more complicated expressions, like -3x^2+7x-15 or -2 sin (4x^2).Right now I'm doing an equation solving exercise. There I have to check what the user wants to do to the equation, like +2x or /(-5).

View 2 Replies

ActionScript 2.0 :: Checking If A Specific Movie Is Loaded In A Level?

Jun 15, 2009

im making a sort of a game and depending on what u choose u may load 1 of 3 or 4 options of movies into a specific level for each option. Meaning: the different toy hands are allways loaded on level 3, no matter which u choose and so on. At the end i need to make a list of the choices the user did, so i need to know if "hands_blue.swf" is loaded in level 3, and if so then push."hand blue" into an array. Im trying this on the _root frame,but no matter what option i take, i allways get the same option:

Code:
list=new Array();
if (_level(3)==="hands_blue.swf") {
list.push("Selecci�n: hand blue");

[Code].....

View 11 Replies

ActionScript 2.0 :: Checking Value Of Input Text?

Jun 5, 2008

Working on a simple dog and pony show that needs to fake some password entry. I'm in Flash CS3 using AS2.0.

I have an Input Text field named "txt_pinnums" and its line type is set to Password. It has a variable of "pinpassword".

All I want to do when "btn_ok" is pressed is check that the numbers entered on the keypad that are now in the input text field equal "1234". It seems though that the value of that field is a bunch of HTML, not simple characters. Here is what I have:

PHP Code:

stop();txt_pinnums.text = "";function checkPin() {    if(pinpassword eq "1234") {  trace("good");    }    else    {        trace("bad");    }}btn_ok.onRelease = function() {    checkPin();} 

I'm sure my AS is not that good, but as I said this is just a simple show and tell demo that will be thrown away. How can I test that the input text equals 1234? If I do a trace(pinpassword) I get a bunch of HTML in addition to the characters entered.

Also, one syntactical question. I tried this:

PHP Code:

btn_ok.onRelease = checkPin; 

But that doesn't work... that type of thing works in JS though. Curious as to why it doesn't work.

View 4 Replies

Media Server :: Checking JS Runtime Memory Used For Specific Instance?

Jan 11, 2012

FMS has print error 'JavaScript runtime is out of memory', Is their any way to check the js runtime memory used for specific instance?

View 7 Replies

ActionScript 3.0 :: Checking For No Keyboard Input Or A Function Call?

Oct 27, 2009

I'm working on a game that involves some timed animations and I need to fire a kind of 'failed' event.Basically I'm moving a clip from one point to another on the stage, the user has to input a correct key combination before the endpoint. I'm capturing the inputs correctly, but I need a default procedure to fire if the player doesn't input anything at all.So I'm guessing that at the endpoint I could check if my function to capture the key inputs was actually called, and if not, call the 'failed' procedure, or if at the endpoint, no keys were pressed, do the same

View 1 Replies

Professional :: Error Checking Input Text Fields?

May 24, 2010

Just wondering where I find a list of what can be error checked in input text fields?I'm looking for things like...- checking that letters and not numbers are entered- checking that an entered number is in a certain range

View 2 Replies

ActionScript 2.0 :: Text Input Boxes - Checking Right Answer?

Jan 26, 2009

I have four text input boxes, and I need to be able to script it so that when the "Done" button is pushed each of the boxes are checked for the right input. I've tried two different methods, neither of which work or the answer is automatically correct.

View 3 Replies

ActionScript 2.0 :: Checking Email And Password Input Fields

Jul 9, 2003

I'm creating a form in Flash MX and I need to created a script that check if the two passwrod text intup field are the same or not, if they are the same it will go to one frame and is they don't match it will go to a diferent frame. I need to created another script that will check if the text input field for the email has the symbol @ and .com, if this is true or false it will go to one frame or another.

View 1 Replies

XML :: Admin Panel - Big Spaces Between Phrases (Carriage Return)

Feb 8, 2011

I am developing an admin panel for an flash site. One of the sections contains large amount of text containing Carriage Returns. It can look as this :
John Doe was born in Athens in 1974.
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996.

So from the text area the text goes to mysql and from mysql I generate an XML file. The problem is the xml file source is looking like this :
John Doe was born in Athens in 1974. 
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996. 

This way in flash the text has some big spaces between phrases and I dont like it. How to generate XML file to be like this :
John Doe was born in Athens in 1974.
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996.

View 2 Replies

ActionScript 3.0 :: Checking Contents Of Text Fields - User Input?

Jun 18, 2011

I am just trying to check the contents of text field that the user can enter text into.
Here's the code:
btn_check.addEventListener(MouseEvent.CLICK, checkAnswer);
function checkAnswer(evt:MouseEvent):void {
if (answer.text=="48%") {
messageBox.text="CORRECT";
} else {
messageBox.text="INCORRECT. TRY AGAIN.";
}}

View 1 Replies

ActionScript 2.0 :: Email - Checking Text Input Is In Valid Format

Feb 24, 2009

I'm making a form in flash for an application I'm building. In the Email text input, I want to check that the user has entered a real email address. Obviously as long as its text@text.text then I'm happy. How do I check what the have entered a valid format?

View 3 Replies

ActionScript 2.0 :: Check User Answer By Checking Input Text Box

Jul 26, 2004

how do i check the answer that enter by user.... the marks is given by checking whether they user key in the keywords or not... i m thinking of using string method...but i not able to do it...

View 1 Replies

ActionScript 2.0 :: Checking Input TextField For Correct Email Address?

Jan 30, 2007

The thing I want is like I will have a input text field for someone to type his email address, but after he presses the send button I want it to check that input field and see if there is the "@" and the "." symbol available in the field or no.

View 11 Replies

ActionScript 3.0 :: Checking Data With Database Using ASP?

Apr 22, 2011

I am a beginner using AS3. I'm trying to set up a simple Flash SWF validation of 2 text input boxes' data. In one box the user enters a username and in the second box they enter a password. This is sent to an ASP page which checks the name and password with a SQL Server database on my site. If their name and password are in the database, then the ASP send back to the SWF, "YES" and if not, "NO". The AS3 could then use an if/else: if "YES" then gotoAndPlay(2), or else display a message.The ASP script/page is completed. I've tested it with another program, and it works to check the DB and get back data.My AS3 is not working.e AS3 script to get it working.Here's the script so far. It get a trace of: [object URLRequest]. So I do not get any data back.

ActionScript Code:
stop()
nextBtn.addEventListener(MouseEvent.CLICK, nextBtnClick, false, 0, true);

[code].....

View 2 Replies

ActionScript 2.0 :: Type Checking Data In Array?

Jan 15, 2006

I'm trying to do something such as:

Code:
var n:Node = openList.shift();

I know that all of the data contained inside openList is a type of Node object, but Flash returns an error. I don't know how to typecast such as placing (in another language)...

Code:
(Node) openList.shift();
...to tell Flash that the data returned will be a Node object.

Better yet, is there a way to specify, while declaring the array, the type of the data that will be placed in it?

I could just take the :Node tag out from my variable declaration, but this might be in a tutorial, so I should at least act like I believe half the stuff about proper coding I write about

View 3 Replies

ActionScript 3.0 :: Checking (data) Type Of Argument?

Mar 14, 2009

I have a function and it accepts an argument, it can be a MovieClip or an Array. How can I determine what the type is of the argument? I did an attempt, but it didn't work, my code currently looks like so:

Code:
var peopleArray:Array = new Array("Alfred", "Bob", "Casper", "David");
function myFunction (givenArray:Object) {
if (givenArray.dataType == Array) {
trace ("This is an array");
// do stuff where an array is needed
[Code] .....

View 1 Replies

ActionScript 3.0 :: Http Checking - Flash Application Is Still Requesting A Data Or Not?

Jul 24, 2009

my flash application requests an xml information in a php site.... How would I monitor if my flash application is still requesting a data or not? because sometimes my application stops requesting

View 1 Replies

Professional :: Input Data From A Frontend Site Into A Backend SWF, Pull Data, Then Send Back To Front?

Aug 31, 2011

I have a site with an SWF that I can put some metrics into, such as ZIP Code, Weight, etc..    then, it takes that info and gives me shipping rates.
 
I need to build a front-end site that I can have a forms page that will push data to the backend SWF, and then return the data back from the SWF to the front end.
 
Front-end -> SWF (Zip Code, Weight, Size) -> *Calculates* -> Front-End
 
That should be the flow..     So I need to send data to the backend, GET the data that it calculated, and return the results to my front-end.

View 3 Replies

Data Integration :: Compare Input Text With Imported XML Data?

Oct 5, 2006

Compare input text with imported XML data problem

View 1 Replies

ActionScript 1/2 :: Input TextField With Specific Embedded Characters?

Feb 21, 2010

I have an input textfield nested inside a movieclip, i embedded a set of characters but when i run the movie i can still input characters that were not part of the embedding list. The input text field has both an instance name and variable name. If i copy that text field into an empty fla file, it works correctly by not allowing character inputs that were not embedded.

View 1 Replies

ActionScript 3 :: Specific Text In Input Box Causes Certain Image To Display

Nov 2, 2010

I want to know how(and what scripts) to take words from a text input box and cause it to display and image Ex: if the text box said "smiley face" in it, then the image "smiley_face.jpg" would display on a certain movieclip and can be dragged around the stage and when a new image is loaded, it doesn't replace the previous image on the movie clip.

View 2 Replies

ActionScript 3.0 :: Capturing Keyboard Input For Specific Key Combination's?

Jun 15, 2010

capturing any of the keyboard combinations below in the Flash Player. I am building this as a stand alone .swf file, so there won't be any conflicts with a internet browser, though my concern is reserved operating system shortcut keys.

F3
Press
Alt + X
Alt + X + .

[code]....

View 1 Replies

ActionScript 3.0 :: Input A Variable At A Specific Portion Of The Text?

Feb 29, 2012

I have a string of text, but within this text I want to input a variable at a specific portion of the text. Now this string of text is taken from an XML file. So the XML file would look like this for example:

Code:
<name>Sweep</name>
<type>ATK</type>
<target>AoE-EN</target>
<caste>Warrior</caste>
<desc>"This is a text"+temp.alias+"hey"</desc>

The <desc> is an example of a way I tried to make it work. What I want to happen is when I display the desc in my flash file, it inputs the alias (which in the xml is the name) of the item. In PHP this could be doing using EVAL() but I notice the support for that type of function is removed in AS3.

View 10 Replies

ActionScript 2.0 :: Create An Input Box Which Directs A User To A Specific Frame?

Jul 29, 2009

I want to create an input box which directs a user to a specific frame, based on what they enter.I'm making a text-based adventure game, in homage to the ones of old, and basically, if someone enters say the word, "light" into the box, I want it to take them to the frame labelled "light".I also want the input box to respond ONLY to enter key pressing.

View 9 Replies

ActionScript 3.0 :: Calling Function When Specific Input Text Fields Are Selected?

Dec 10, 2011

I have a number of  input text field on stage. I want to call certain function when specific input text fields are selected.

View 2 Replies

ActionScript 2.0 :: Pulling Specific Data From XML?

May 25, 2005

pulling specific data from XML? This is what I mean...Supposed I have an XML file like this:

HTML Code:
<data>
<article>
<ID>1a</ID>
<related items>

[code]....

Now, in Flash I want to load all items that have "5f" listed as one of their related item. So only display articles where item = 5f

View 7 Replies

Flex 4.6 Mobile Sqlite Specific Data?

Mar 2, 2012

First off I am new to using Flex, but I have pieced this app together with help from online tutorials and information. Basically my app is like a directory of names, addresses and so forth, but I also have additional fields of "week" and "day". What I am trying to do is have a list that shows only the names of, for example Week 1 - Monday. Below is some of the code I am using to help you understand what I am trying to do.

<s:List dataProvider="{AddDoctorDatabase.doctors()}" labelField="name" change="onDoctorSelected(event)"
left="0" right="0" top="0" bottom="0"></s:List>

[Code]...

View 1 Replies

ActionScript 2.0 :: External XML Or TXT : Use That Data For A Specific Method?

Nov 1, 2011

I've learned recently that you can use txt file for simple data too, so I include it here as well.TXT contains (not sure if correct, should have same data kind as the xml):

point1&x=1&y=2
point2&x=1.5&y=2.5
point3&x=5&y=-5

XML contains:

<?xml version="1.0" standalone="yes"?>
<points>
<point1 x="1" y ="2"></point1>

[code]....

What I have:

- I have 2 dynamic textfields: text1 (variable: outPut1) and text2 (variable: outPut2)

- I have 1 input textfield: (variable:inPut)

- I have 1 button

What I'm trying to do:

- When typing point1 in the input textfield and then pressing the button,(onRelease), outPut1 textfield should show the number 1 and outPut2 textfield should show 2.

- Similar, when typing point3 in the input textfield and pressing the button, outPut1 should show the number 5 and outPut2 should show the number -5.

-It is not only for these three points, it should be applicable with say 50.000 to 200.000 more of such points, each with different x and y values.

To sum it up:So Flash (with AS2) should screen the nodes or txt (for those point names) on what was inserted in the input textfield, then fill the corresponding attributes (XML) seperately in the textfields and all that after the button was pressed. The same deal if it was done with txt, if possible (have read that with txt, loading of data would be faster?).

View 4 Replies

ActionScript 3.0 :: Get At A Specific Property On A Xmlsocket Data Response?

Sep 18, 2009

I just caunt figure out how to get out a specific property on a response..for example my listner is

Code:
socketConnection.socket.addEventListener(DataEvent.DATA, recievedHelloBack);
my function is

[code].......

View 1 Replies







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