How to check the answer in the input text area

Hey, I have a project for school on the colons and semicolons. As part of it, I want to make a box of text input that puts the answer to a question in the player then clicks on a button that controls the input box, and if its correct goes to a correct screen so bad it goes to a screen that is incorrect. Unfortunately I do not know how to do someone help me. Thank you!

var answerA:Array is ["the correct answer to the question 1', 'address 2', '3 ', answer...];.

var questionA:Array = ['question 1', "Q2", "q3",...];

var currentQuestion:int = 0;

checkAnswer.addEventListener (MouseEvent.CLICK, checkF);

function checkF(e:MouseEvent):void {}

{if (answer_tf. Text is answerA [currentQuestion])}

as much as goto

}

}

increment currentQuestion somewhere

Check if the quiz is completed.

Tags: Adobe Animate

Similar Questions

  • How to detect if the cursor is no longer within the input text area

    Hello.

    My question today is:

    How to detect (in AS3) if the cursor is no longer within the input text area?

    I tried to mouse events, events, events in text but without success.

    Any ideas?

    Concerning

    If you have a textfield of entry with the instance name it '...

    it.addEventListener (FocusEvent.FOCUS_OUT, focusOutHandler);

    function focusOutHandler(evt:FocusEvent):void {}
    trace (evt. Target.Name);
    }

  • How to check the table have are all views in oracle

    Hello
    How to check the table have are all views in oracle
    SELECT * FROM user_dependencies
    WHERE type='VIEW'
    AND referenced_type='TABLE'
    AND referenced_name ='Your_Table_Name' 
    

    You can use dba_dependencies to find views in the different schema.

  • Setting focus to the input text area

    I use MX 2004 and construction of a simple game where the contribution of users numbers in a dynamic text box. To limit the number of mouse clicks, I'm wanting to set the focus to the input box when that screen/page loads. Right now, we have to click on the area of input text field, enter their choices, then click on the submit button. I just want to type first, then click on the submit button.

    I set a variable to the text box of entry as "answer_box".

    I thought I remember a 'setFocus' or a 'onFocus' in ActionScript once before, but I can't find an example.

    Any help would be great!
    Thank you

    Thanks Rothrock. It worked. The 'Sélection' class allows you to define and control the text box where the insertion point.

    My text entry box is called, "years1.

    In the layer actions, the first line, I put - Selection.setFocus ("years1");

    Works perfectly. Thank you for pointing me in the right direction

  • How to check the data that are not digital?

    I have a varchar field and I would check for all of the lines where it does not contain a numeric value. How can I achieve this?
    Thanks in advance.

    One option is to write a small function

    CREATE OR REPLACE FUNCTION is_numeric( p_str IN VARCHAR2 )
      RETURN NUMBER
    IS
      l_num NUMBER;
    BEGIN
      l_num := to_number( p_str );
      RETURN 1;
    EXCEPTION
      WHEN others THEN
        RETURN 0;
    END;
    

    only then can you call

    SELECT *
      FROM some_table
     WHERE is_numeric( some_string_column ) = 0
    

    Of course, you can adapt the function to return the numeric value rather than a 1 or a 0 more.

    Justin

    Published by: Justin Cave on June 21, 2011 18:15

    Depending on the version of Oracle (which you don't mention), you can also write a regular expression to search for things other than numbers. This can become a little difficult if you have to manage commas and dots as decimal separators and grouping because different regions use the symbols differently and have different rules about what are valid models.

  • disappears from the input text area

    I know it must be something simple, but it's still my butt.  I put a text on a layer entry box and everything seems fine.  I play the movie, and any text box?  If I put a top filter, it will be displayed, but otherwise, it seems that there is nothing there.  Not even the border is visible.  All static text is good, just without input box.

    «.. . "just one of those days."

    Dynamic textfields get cranky for any type of animation or if a mask is applied to them.  You could try the incorporation of police and see if that makes a difference (I don't know why it would be... it is usually the text that has the problem, but then again, it's usually just dynamic text fields that raise this problem (no dynamic input textfields).)

  • How to leave the input field to accept more than one "specific" response

    Hello

    I work for something and try to create a game show type-box-based for one of my classes, where a text entry field can change that is the border color if 2 or more words from a list of recognized words is registration.

    For example, a list of possible answers a: R, G, B, Y to the question "name 2 colors»

    I want to create an input text area where the border of the box changes color if the 2 letters (in the list above) are entered in it.

    I tried implementing a variable NumberSuccesses and set so that the number increases by 1 for each letter entered for example

    If (Ex.text is "R");

    NumSuc = NumSuc + 1; var NumSuc has already been previously defined in the code

    If (Ex.text 'G')

    NumSuc = NumSuc + 1

    If (NumSuc == 2)

    Ex.borderColor = 0x0000FF

    but it does not work... and I tried to do it with another function which I use for several text boxes as if there are boxes A, B, C. I could set up a general function where if the correct answers were entered into A, B, C respectively, only then will say, a check mark appears by using a

    EnableCheckmark (); function of type. Don't know how to do if it is the same text entry box well. Also just tried adding in the same function re.

    If (Ex.text is 'R' + 'G')

    Ex.borderColor = 0x0000FF

    .. Does anyone know what I can do?

    The solution of Mathias with the logic of the evaluation:

    What are the possible answers

    var solutions: Array = new Array ("A", "B", "C", "D");

    function testInput(_inputText:String):Boolean

    {

    the delimiter could also be a comma, it's here a space

    var inputStringArray:Array = _inputText.split("");

    var counter: Number = 0;

    for (var i: int = 0; i

    {

    for (var j: int = 0; j

    {

    If (inputStringArray [i] is [j] solutions)

    {

    counter ++;

    }

    }

    }

    If (counter > = 2)

    {

    trace ("true");

    Returns true;

    }

    on the other

    {

    trace ("false");

    Returns false;

    }

    }

    TextField with the name input_txt onstage

    input_txt.addEventListener (TextEvent.TEXT_INPUT, answerTxtInp);

    The function that will be called by the event listener

    function answerTxtInp(txtEvent:TextEvent):void

    {

    According to the responses of characters, change the color of the border

    {if (testInput (input_txt. Text))}

    input_txt. BorderColor = 0xFF0000;

    }

    else {}

    input_txt. BorderColor = 0 x 000000;

    }

    }

  • How to display the ToolTip when the input text is disable

    How to display the ToolTip when the input text is disable?

    Just checked in FF and IE11, works fine for me (jdev 12.1.3)

    
          
    
    

    Dario

  • How to check the internal operations, Manager of competitor status in Oracle Apps R12 of en

    Step by step how to check the internal operations, Manager of competitor status in Oracle Apps R12 of front end and how to start their.

    Richa says:
    Step by step how to check the internal operations, Manager of competitor status in Oracle Apps R12 from front end

    Simultaneous treatment - platform generic competitor Manager Questions / answers [ID 105133.1]

    and how to start the

    (1) using the adcmctl.sh (from the backend)
    (2) using the button Activate (from front) - http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm#4334248

    Thank you
    Hussein

  • How to check the timeshot of iProcurement notification of application approval?

    Hi all:

    As the topic, how to check the timeshot of each notification of approval of iProcurement? Can anyone provide the SQL code to check?



    Environment: Oracle R12.1.3 | AIX 6.1


    Concerning
    Terry Chen

    The delay could be because
    (1) the Workflow background process in Oracle is down or because it is expected to run every hour or more.
    (2) the notification of workflow process that sends email notification is declining.
    (3) if the example you gave is a concrete example, the difference is exactly 1 hour. It's too much of a coincidence. In this case, the email sent immediately. It just seems to be a late hour because of the time zone difference.

    Hope that answers your question,
    Sandeep Gandhi

    Edit: The third point that the above is not valid. I just noticed that the difference is 25 hours. Looks like your mail or Outlook server was down.

    Published by: Sandeep Gandhi, independent Consultant on March 25, 2011 07:27

  • Anyone know how to check the date of warranty until when?

    Anyone know how to check the date of warranty until when?

    https://checkcoverage.Apple.com/Jo/en/;JSESSIONID=9pJ0X9pFPJtNg3c44yDGCvk9pVpt5l QSgn4B60y4Skv1WfmnqMkF!-1840326800

  • How to check the balance on the gift card itunes

    How to check the balance on the gift card itunes

    Redeem it

  • Satellite A200 - how to check the temperature of the processor fan?

    Hi all

    I have a Satellite A200 that my teenagers use a little, or abuse a little! Recently, it would not start up. I suspect the fan and pulled out the fan cleaned and tested the fan on a PSU, worked out well. He put it back together, ran startup repair and now the computer is operating normally. The fan is however not appear to come at all. In the Device Manager it tells me it works very well. I'm all good with the mechanical side of the House, but I'm a quamby operating system! How to check the temp CPU or fan?

    Thought that replace the fan but don't want to go that far just to get no results. Currently using the vacuum on low like an external fan and didn't want to just run the laptop with no cooling for fear of permanent damage. Although children watch movies with her on their doona may have already reached this!

    Any advice would be appreciated.

    Hey mate,

    How to clean the fan exactly? It s advisable to use the jet of compressed air. This could blow the dust of fans cooling and, therefore, it of not necessary to disassemble the laptop.

    In addition if the fan doesn't work anymore it of necessary to replace. You can order spare parts at an authorized service provider.

  • How to check the print queue in Windows 8

    Difficulty controlling the queue with your new Windows 8? Here's a great video on how to do it:

    Hope this helps to understand how to check the print queue in Windows 8. If you have problems, let me know, I'll see what I can do to help.

  • HP Photosmart 7525: How to check the version of the firmware of the HP PhotoSmart 7525 is up-to-date?

    How to check the version of the firmware of the HP Photosmart 7525 is up-to-date? And where can I go to download the latest firmware?

    Hello

    Follow these steps to check the update of firmware for your printer:

    http://support.HP.com/us-en/product/HP-Photosmart-7520-e-all-in-one-printer-series/5199461/model/5286642/document/c03312867/

    Note: the printer must be connected to your network to check the updates, if it is connected with a USB key follow the steps in the tehse to connect the * beep * to your wireless network:

    1. In the wireless menu, tap Settings.

Maybe you are looking for