Problem with comparison of input text

Hello people,

I tried searching for an answer to this question, but I did have a little chance to find something that actually fits the question.

I created three zones of text entry with the instance names: input001, input002 and input003.

The three boxes are used for a comparison of values of simple text for an exercise in question.

The entry text boxes have been entered restricted so that only the values A, B, C or D can be entered (representing the four possible answers).

I created a button and event listener and the following function.

function submitBtn001Click(evt:MouseEvent):void{
    trace("input001 = "+input001.text+" input002 = "+input002.text+" input003 = "+input003.text);
    if(input001.text == "A" && input002.text == "D" && input003.text == "C"){
        input001.type = "dynamic";
        input002.type = "dynamic";
        input003.type = "dynamic";
        correct.alpha = 1;
        submit_btn.visible = false;
    }else if((input001.text !== "A" | input002.text !== "D" | input003.text !== "C") && tryAgain == 1){
        tryAgain++;
        trace(tryAgain);
        submit_btn.visible = false;
        reset_btn.visible = true;
        incorrect_first_try.alpha = 100;        
    }else if((input001.text !== "A" | input002.text !== "D" | input003.text !== "C") && tryAgain >= 2){
        input001.type = "dynamic";
        input002.type = "dynamic";
        input003.type = "dynamic";
        incorrect.alpha = 100;
        submit_btn.visible = false;
        }        
}

When I compile the SWF, I get the following error:

1067: constraint implied of a Boolean value to a number that is unrelated.

The error is attributed to the combination of else-if statements. If I comment on the other if statements, the SWF compile without error and the code runs correctly, when I enter the correct answers in entry areas (A, D, C).

What I don't understand is why my comparisons of strings in the world if the statements are generating an error, or why this error would have something to do with Boolean or number, as I compare the string value of text entry boxes (input001.text, for example) with a string.

Thanks in advance for your help.

Use the OR operator logic (|) instead of the OR operator (|)

Tags: Adobe Animate

Similar Questions

  • Problem with an application of text analysis

    Hello

    I am a beginner in labview and I have some problems with my application.

    I have the front of my VI, an area of input text and two arrays of strings: one that contains a few words I have to say if they can be found in the text.

    And the other table contains the results of research: found or not found

    I did my version of the block diagram (I have attached to it), but I noticed that it only works only the first time I run the VI, subsequently, it displays the same results despite the entry of text or words. I find the my table has continued to add new entries every time that my for loop runs so I try to reset the table with constant strings at the beginning, but I guess that I did not it properly because I have the same problem.

    And I also have another problem: my array of words has its size = 7 and if I fill it with fewer words it's size, empty boxes in the results table appear as noted.

    Can anyone gve me a suggestion?

    The first attached VI is my original request where I found the problems described and the second contains what I have tried to correct

    Autoindexing if your friend here (and MUCH simpler because of things).

    Also know that "offset after match" will be-1 if the word was not found.  So you can just do a simple check for the number being greater than or equal to 0 see if it has been found.

  • Problems with line spacing and text in Indesign 6 rate

    Hello everyone. I'm a graphic designer working with new magazine layout in Indesign. I used Quark for years and recently fell on this problem...

    In a paragraph, we usually use a soft return back some words to the next line. However, there are opportunities, I notice that in doing so the lines above where I am bumping the word ebb and Exchange. I've never had a problem with this before and it is a serious problem for us. Is it a setting I have on that I'm not aware? What can I do to avoid what is happening?

    Thank you for any input or advice.

    It is one of the main differences between Quark and ID.

    ID has a "paragraph composer" for will as a simple line like Quark composer, and it is enabled by default. When you use the paragraph composer, text is constantly analyzed and spacing adjusted for better form and appearance (according to the spacing algorithm and parameters of your justification) for the whole paragraph. If force you a line break, ID can adjust all the lines above as well as the following lines.

    If it is a 'serious problem' you shoud probably witch to the composer line simple. You will find a drop down for it in the dialog box of the definitin of paragraph under the parameters of the Justification style, or you can change individual paragraph as a local override from the steering wheel to control panel menu.

    Most of us who've been ID user for some time find the paragraph composer include the forces of the ID, and feel that it generates more nice looking text than a single-line composer.

  • Problems with the digital input/output

    Hello

    I have a little problem with my card PCI-6143. I would use two connectors digital one as a starter and one as an output. Now, I have the problem that I do not know how I address them. The input works as I want but not the output.

    As an example. I call my channel output on this name: Dev1/port0 / line0:0.
    With this call, the application works very well. If I change the output channel to Dev1/port0 / line4:0 I get an error that the values can be read and 0 and 1 are valid values.
    I hope that the call is right, I wrote that out of my head.

    My questions are. Is it correct to call a single digital channel with this name?
    I'm not sure because I do not understand what these means 'line' and if I allocate really single channel or more.
    The second question is, can someone give me an example of how I assign two digital channels (how to address them)?
    I know it's maybe an easy question, but I can't seem to get it corrected.

    Hope someone can help me.

    Best regards

    The syntax that you use is intended to select several channels: the numbers are the initial and final channel in a subsequent channel list. Thus, written Dev1\port0\line0:4 means 5 lines are included in the read/write (FWIW written 4:0 has the same effect). It is redundant but good writing line0:0, which means a single line, but you can write to Dev1\port0\line0 which is simpler.

    This is a help page on this topic.

  • Problem with opening programs of text and photos after the upgrade of computer for Windows 8

    Original title: Photos open in Notepad

    Hello

    Laptop with win 8.

    Recently upgraded XP to win8 with purchased MS DVD.

    All text programs open graphics (pictures) in Irfanview & if I send them WORD show as hieroglyphics jeeperish.

    And all the photos to open Notepad in hieroglyphs jeeperish but if I open them with "Sendto" Irfanview or MS photo editor pictures appear.

    Seems the association went haywire. How can I fix this please?

    8 win in my PC is not that.      .. thanx... .Nick

    Hi Nick,

    Please contact Microsoft Community. I understand that you have a problem with opening the programs of text and pictures after the computer upgrade to Windows 8. I appreciate your efforts to solve this problem, I'll probably help you solve this problem.

    This problem could occur if the default applications are not set correctly.

    I suggest you read the article that will help define the default applications that Windows automatically uses when you open a particular type of file, such as a song, film, photo or Web page.

    Choose the apps Windows uses by default
    http://Windows.Microsoft.com/en-us/Windows-8/choose-Programs-Windows-uses-default

    Hope this information helps. Reply to the post with an up-to-date report of the issue so that we can help you further.

  • What is the PROBLEM with Acrobat (randomly drops text)

    I'm at the end of my rope

    with Acrobat CS3. He distills randomly my specifications with all para

    graphs are missing here and there. Sometimes I can restart and get all of the document to print, but once again today, I have a contract which

    not print completely even after a reboot of the entire system.

    Trying to distill in Word 2003. Short documents on a page are generally good, even if I had problems with a few lines of text missing on invoices that I print on Excel. But this 5-page contract gives me headaches... I'll have to resort to printing and scanning the doc from back in the distillation in the form of a chart in PDF format, or copy and paste all in QuarkXpress, which has a PDF Distiller that is 100% reliable. I wish I could use THAT Distiller with Word! I can't stand it. Why Acrobat distiller cannot distill with reliable documents? A contract is a serious thing... missing paragraphs can mean serious legal trouble!

    I need an alternative, unless there is a fix for this problem.

    Mark, it could be that you need to install the MS Hotfix listed here:

    http://support.Microsoft.com/kb/952909/en-us

  • BlackBerry 10 problems with quick keyboard input?

    Curious to know if the owners non - Q10 this experience? If you do not have a Q10, try the following actions that stir up trouble (typing while receiving a text or BBM, message or by immediately typing affter hit send) and I would like to know if the behavior is not the same on the Q10?

    I type very fast on my keyboard of Q10. Often the time when entering text, say in a text message or conversation of BBM, I will hit enter to send and to start writing again. With any iPhone or Android, you would just keep typing. Half the time, I need to re - select the area to keep hits again, or he starts to enter a few characters are echoed to the screen and the unit freezes during a seecond and then the text box is empty, even if the phone works normally after that. Is it a known issue for BB10 lock up like that, and is the duty to select the text box again after sending the default behavior? I have not found a way to disable it and it is very annoying.

    P.S. I'm the only person who can manage almost never hit the X in the circle on the browser to clear the url? I have to remove most of the time...

    Solved... apparently WhatsApp is to blame. Found a tip in the classic BlackBerry users forum which could be related to a memory leak. Deleted and instantly all my problems were solved... hmm...

  • Two problems with the Acrobat DC text properties

    Since the switch to Acrobat DC, I have two questions, I have not been able to solve on my own.

    I can't change the default color of text in a text box in Acrobat DC. I chose "Text box add", type something in the box, choose 'Text properties,' change the police, size, and color, right-click from the edge of the area, then 'Create the current properties default.' It worked with Acrobat Pro, but with Acrobat DC it doesn't. The text I changed red returned to black. The other properties are OK.

    In Acrobat DC, I added the properties of text for quick access, but it does not work there. I highlight text, click text properties in the Quick Access toolbar, and nothing happens, but if I click on the text properties on the toolbar to comment, then the menu drop down appears and I can change the properties. I don't want to have the opening of the toolbar of comment, too much space on my screen.

    Hello

    We have released an update today that solves both of these problems. Please open Acrobat or Reader DC and visit help > check for updates to ensure that you are on the latest patch.

    Details on the release: https://helpx.adobe.com/acrobat/release-note/acrobat-dc-august-02-2016.html

    Please let us know how it goes.

    Thank you

    -ashu

  • Several problems with embedded DHTML menu text boxes, drop-down

    We have recently improved HR 10 HR 2015.  We know a menu dhtml drop-down text question existed prior to the upgrade and the upgrade did not fix it.  We now have a more serious problem.  We are not certain that all started with the upgrade, but we detected it after you convert our projects to HR 2015 and republish them.  I list both here in case they are connected.

    The problem known: styles of multilevel list to the level of the main topic and within the text box drop-down dhtml to first level.  However, if we add a drop-down list box text in a drop-down text box and apply a list style at several levels to the text in the drop-down text embedded dhtml, the topic seems in good shape on the Design tab, but loses the line numbers or bullets in the preview and in the published version.  No idea what would cause the list not to display properly or how to get the multilevel list styles to work in this situation?  (Yes, we know we can use styles list rather than multilevel list styles, but it is problematic, too)

    list1.png

    The novelty is that, when content is published and read in IE or Chrome (the two major browsers use customers), the drop-down text link embedded dhtml is always present, but the text in the drop-down list embedded dhtml has disappeared (for example, nothing happens when you click on the link to open the text box).  It works in preview, but not when accessed through a browser (or access to the content of webhelp after publication to a server directly from my local computer).  Any ideas on how to get it to display?  The net result for our users, is that a substantial PART of the content of the assistance amount is now more accessible.list2.png

    Thanks in advance for any help you can provide to these questions!

    Here are a few things that I would consider trying.

    First, click on Tools > update DHTML and let it do its thing.

    A test to see if something has changed. If so, great!

    If the problem persists, open one of the samples project. Click here to see a video on how to do

    Then open Windows Explorer. Click here to see a video on how to do

    Find and copy a file called ehlpdhtm.js and return to your project and paste this file into so that it replaces the one that is there.

    Then see if things are better.

    See you soon... Rick

  • Problems with export/save the text file in Indesign

    Hi scripters,.

    I have a problem that I don't know how to solve.

    InDesign CS3, Mac and PC - seen as the problem on some Macs, not all, but some still have / get this error.

    I made a script that collects the text of some managers of related texts:

    for (var i = 0; i < myMainList.length; i ++) {}

    var curTF = myMainList [i];

    while (curTF! = null) {}

    myExportString += curTF.contents;

    curTF = curTF.nextTextFrame;

    }

    myExportString += "\n\n###\n\n";

    }

    alert (myExportString);

    It collects the text and also it will display ok in the dialog box.

    However on some computers (Mac) the following will only produce a byte zero of the file (when there are several textframe in the above loop, a zero-byte file is still produced - but again, it is only on some Mac) If a single textFrame with only a small portion of the text is saved/exported it works:

    var Folder.myDocuments.path = myFolder + "/ Desktop/export";

    //alert ("Myfolder:"+ MyFolder ");

    {if(!myFolder.exists)}

    Folder (myFolder) .create ();

    }

    var myFileName = myFolder + "/" + win. FilePnl.FileGrp.FileName.text + ".txt";

    var myFile = new file (myFileName);

    myFile.encoding = 'text ';

    myFile.open ('w');

    myFile.write (myExportText.replace("/\u2011/g",'-')); Replace (/ [^ a-zA-Z 0-9] + / g, "));

    myFile.close ();

    It has to do with using .silence?

    I hope someone can help me with this summer working on this problem for means of time now.

    Thomas

    Somehow myExportString became myExportText.

    In addition, what happens if you replace the text before write you it

    to deposit?

    Another thing you could try is to cast it to a string as follows:

    String (myExportText)

    Also, maybe try to change the encoding "UTF-8".

    Substances

  • problem with built-in predefined text animations

    Hello

    I just started my first job with AE.
    I want to do a very simple thing: animate text (to be precise, only 3 short words) with one of the excellent effect built in, which was delivered with the product.

    But I realized, that the end result of the effect, that I chose in the list, is different from that how I saw on the site Adobe Gallery.
    Then I tried other effects too (Flash, Flash blue) and with the AE is not the same, I'd say it's on another comprehensive plan.
    For example, text Pulse exposure effect appears to be a very complex thing on the site, while at AE makes only fade in and out of my text: no outline around the letters. characters also do not in growth and shrinkage, so it lacks almost all the fancy functions, that how the effect shows on the Web site.

    Can you please help me where is the problem? Thank you.

    I just tried exposure pulse, and it works very well for me.

    It is possible that the problem you see is related to this tip/warning of "text animation presets", the page I linked to before:

    "If the animation preset requires a color contour or background, animated works only if you have assigned to your text."

    Pulse exposure works by animating the race.

  • I have a problem with the display of text on Corel Draw X 3 after installing a Windows Update.

    Hi all

    No, not so much a question, but I thought I'd post here because it can help others.

    I used Corel Draw X 3 yesterday (12/12/12) to make a simple business card text only. Today - the file open and something is there, but the text is invisible. Further investigation revealed that this affected all fonts and Type 1 fonts from OTF, TTF fonts are immune to the problem.

    What has changed between yesterday and today? A Microsoft update that I shut down the computer last night. I uninstalled the update via Add/Remove Programs, and the problem was solved.

    Any suggestions as to who should I report this problem?

    -Frank Jones
    Dynamic funds, Geelong, Australia

    Original title: Win XP update Corel X 3 12/12 font management breaks?

    I have installed the latest updates and the v2 of KB2753842 solved the problem. Thank you.

  • Problem with the creation of text file 9530 unit

    Hello

    I created the text file in the memory of the device "file:///store/home/user/sample/mytext.txt" with a text using my application. He created the file with the extension "mytext.txt.rem". While I couldn't able to read the same file.

    I tested the same application with 8520 and its works very well... It creates the file "mytext.txt" only.

    I don't know why the name of the text file adds extension ".rem" in 9530.

    Could you please help me to findout the solution?

    Thank you

    SmartPhoneDev

    You have enabled encryption.  Have a look here:

    http://supportforums.BlackBerry.com/T5/Java-development/why-my-text-written-to-a-file-on-the-SD-card...

  • Problem with maintaining the original text of basiceditfield even on unfocus after typing the text.

    I have a Basiceditfield with the original text. Here is the code:

    searchField = new EditField ("","", 1024, EditField.FILTER_DEFAULT | ") EditField.NO_NEWLINE)
    {
    protected void onFocus (int direction)
    {
    setLabel("");
    This.Invalidate ();
    };
    protected void onUnfocus()
    {
    setLabel ("Search");
    This.Invalidate ();
    };
    };
    searchField.setLabel ("Search");

    Text initially searchfield is "search". Onfocus his game to «» I type something in the searchfield, assumes that "ab". When the focus is removed from searchfield label has the value "Searchab". while I want to as "search". Help, please.

    on the focus, use getText, check if it is 'Search', setText to «»
    about onfocus, use getText, check whether it is "", set it to "search".
    on keyChar, use getText, check if "search, use setText for" ", and then return super.»

  • Problem with BasicEditField and predictive text

    What can I do for remove predictive text in a BasicEditField programmatically, as the search for address book entry?

    I think that I can't do with the code, allowing only multitap in the context menu, but the user has seen the AddressBook and want the same thing.

    Thanks in advance.

    And this one:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=11522&query.ID=23...

Maybe you are looking for

  • Conversion rates for simultaneous data acquisition

    I use a Mech multifunction data acquisition. / s/SMU-6366. The maximum sampling frequency for the analog inputs is 2 MHz. Is the time of actual conversion of CDA always 0.5µs, or t - it change with the evolution of the sampling frequency? Can I set t

  • Synchronization of multiple While loops

    Hi all I work with 4 all in curls that are independent from each other that is, there is no data flow in one loop at the other. I noticed that every while loop takes different time to iterate. However, I want to while loops to begin and end at the sa

  • Windows cannot find the file "Updater.exe".

    After I start it, I get the warning, Windows "Updater.exe" file not found.  How should I solve this problem?

  • If the purchase of a laptop on eBay, if she is not a COA sticker, is still a legal installation of Windows?

    I want to buy a laptop on ebay. I asked the seller if the laptop has the license on the side sticker of her reversise and if the version of windows 7 was legitimate.  I was told: "Dear buyer, the unit does not have a license on the lapel sticker, but

  • How to set a file association?

    HTT://go.Microsoft.com/fwlink=69172 My computer htt://go.Microsoft.com/fwlink=69172 send me... .this file doesn't have a program associated with it for performing this action. create an association in the SET ASSOCIATIONS CONTROL PANEL. HELP ME PLEAS