Help comparing 2 Boolean values

Hi guys...

I put 2 variables as Boolean values to keep their use on frameworks:

var ingles: Boolean;

var espanol:Boolean;

And in the framework where I did it, I also have them assigned to 2 buttons: English and Spanish:

background1. AddChild (ENG);

background1. AddChild (ESP);

ESP is Español;

Eng is ingles;

Now, they work well, give "instructions" for the user:

esp.addEventListener (MouseEvent.CLICK, Spanish);

function spanish(event:MouseEvent):void {}

If (Español = true) {}

instructivo. Text = "estas el in fr... « ;

background1. AddChild (Instructivo);

}

}

(instructivo is a created TextField)

The problem I have is the following: in the first step (or frame), I have 1 button to display instructions, where, then you select English or Spanish and a button "play" directly...

Now in the third frame, where the entire game is written I wanted to put the texts he (Score, lives, level) in English, if the user has clicked on English and Spanish, if the user has clicked on it, and that worked fine too:

var score_text:TextField = new TextField();

score_text.x = 100;

score_text.y = 100;

score_text. Width = 100.95;

score_text. Height = 100.95;

score_text.defaultTextFormat = fmat3;

If (Español = true) {score_text.text = "your note:"}

If (Inglés = true) {score_text.text = "Note:"}

background1. AddChild (score_text);

but I need to set another one, if the user didn't click in neither English nor Spanish... so I thought:

If (Español = false & & English = false) {etc..., but it didn't work}

Is it possible to do?

Thank you very much

the first error is:

ESP is Español;

Eng is ingles;

who do anything useful if you need to remove it.

You can use:

var ingles: Boolean;

var espanol:Boolean;

background1. AddChild (ENG);

background1. AddChild (ESP);

esp.addEventListener (MouseEvent.CLICK, Spanish);

function spanish(event:MouseEvent):void {}

Español = true;

instructivo. Text = "estas el in fr... « ;

background1. AddChild (Instructivo);

}

}

var score_text:TextField = new TextField();

score_text.x = 100;

score_text.y = 100;

score_text. Width = 100.95;

score_text. Height = 100.95;

score_text.defaultTextFormat = fmat3;

If (Español) {score_text.text = "your note:"}

If (Inglés) {score_text.text = "Note:"}

background1. AddChild (score_text);

If (! Español &! ingles) {}

}

Tags: Adobe Animate

Similar Questions

  • Help! three digital controls by three Boolean values

    Hi guys, I really need your help. I am trying to create a program where I can choose the button (A - Z and 0-9) keys three keypad and use in order to increase the 3 individual respective Boolean values into the light. I work for a while now. Here's my program: manvery - happy:

    Tissue wrote:

    When I select 'a' of the digital list and I press the keyboard boolean unlit 'a', turns on him. When I press "a" again, the Boolean value lit will be unlight. While the program still works, I can always choose a different as key '5' and the other '5' key it will switch again when I pressed on it...

    Try something like the joint (LabVIEW 2011).

    By pressing one of the buttons (case insensitive) made alternate value Boolean coresponding. Change the selection will clear all indicators. Modify if needed.

  • Increment and decrement with a Boolean value entered

    Hello Experts Labview (and in fact life savers!)

    I have a digital controller (button) in my VI, digital indicator, in addition to a Boolean of power input.

    As an initial state, the digital display will contain a certain value (zero for example) and will only receive the variation in the button entry as long as the Boolean is true, and then add it to this initial value.

    What is the change ? lets say that the button was on 8 before I touched the Boolean true, the value of the indicator is zero, and then I hit the Boolean true.

    Now, when I move the button from 8 to 18 years (variation of + 10) , I want to receive the indicator + 10 and add it to the zero, now the result is 0 + 10 = 10

    Now, the value is false, I move the button and nothing happens to the in the indicator 10.

    Now, the Boolean value is true once again, let's say the button was about 4 at the time, I hit the Boolean true and it spend 4 to 1 (change-3) , the indicator value will now be 10 + (-3) = 7

    I hope I explained the idea in a clear manner, I would be very grateful if someone could help me with this.

    P.S. I have attached only the vi to illustrate the idea.

    Thanks in advance

    You care only remarks how the button changed.  Therefore, you must subtract the old value and the new value to get how to change the button.  Then add inside the structure of the case, this difference to your value that belongs in the registry to offset.

  • How to pin "Info button" Boolean values of the input data to acquire?

    I am a newbie to LabVIEW. I did this VI referring to this ARTICLE http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
    I have problems with taking the values of these pines "Info"... As the functions of 32 buttons, 4 Directions, 8 info axis are wired to 3 Pins?...
    In fact, the goal of my project would be this...
    1 initialize the Joystick
    2. reading axis and Info button
    3 assign characters for each button (a Boolean value) and the axis (-32768 or 32767) as button 1 = Servo1, button 2 = Servo2, Y-Axis(-32768) = MF, Y - Axis (32767) = MB,
    X Axis(-32768) = ML, X-Axis (32767) = Mr... etc...
    4 send the characters to an Xbee Pro connected to the PC with a USB Dongle of Xbee.

    I know it's simple, but such things of convertion and the 'thing' entire component is really confusing... Kindly help me out to the point 3 & 4

    These are clusters.  You can simply use the Ungroup by name in order to leave the values of the components.

  • How to determine the Boolean value selected in a mouse down event pane?

    I have a lot of Boolean controls and indicators in my VI and I would determine what boolean is selected (left click) on a mouse down event pane.  Can I do this without having to specify each of the Boolean in the case of event configuration?

    Thank you.

    Jim

    If you get a ref to your Boolean all they have properties that define it location and size. Compare the location click with the limits of each boolean and where

    Left< click=""><>

    AND

    Back to top< click=""><>

    you have found the Boolean value that ended the click.

    It may be easier to use the Boolean refs table to create a dynamic event and then use the ref returned by the mouse down to get the label of the Boolean value that has been clicked.

    Have fun

    Ben

  • Modify Boolean value on time when you press the button. (set lock time?)

    Is it possible to set a time to lock in LabVIEW? Rather than change the Boolean value for just a sample, I need the value changed for 0.05 seconds. This problem seems very simple, but my programming skills are faulty.

    To simply explain what makes my program, it simulates a sine wave when a button is clicked. I then the amplitude of the sine wave, controlled by another case within the structure structure master case (if I can call it that). Set to false for the structure of business range is 5. When a key is pressed, I need the case structure change true 0.05 seconds, changing the amplitude to 10. The structure of the case must then return false and generate its initial magnitude of 5.

    Is it possible to program very simply? If only I could have a latch to set time button.

    Yes.  When the button is true, store the current time in a shift register (If false, collar shift enter thread through unchanged).  Each iteration of the loop, compare the current time to the shift register times.  If the values are less than or equal a.05, then run the true case of your case amplitude structure.  (In fact, I found myself using Select statements for this example.)

  • Coordinate the functions of Boolean values by their name

    Hi all

    I have somewhat a challenge I appreciate some help with. I am trying to create a program that synchronizes the function of a group of Boolean values by their names. If the Boolean values are names bool 1_i, I want that they be synchronized such that when for example a bool 1(1)(a) is turned on, then all the other 1_i bool are replaced by the same State.  The value group Boolean bool 1_i will initially be in the same State, but I'm trying to get a program that allows them to work in parallel like this.  I was able to make a table of 16 by 128 to work like this, where every row has represented the bool j_i group where I = j = 128 and 16. Now, I want to have the same function as a stand-alone Boolean values that are not placed in a table the table function palette.  Indeed, I am trying to get an array of Boolean values without creating a Boolean matrix in the traditional sense of the term. It is because I want the position to each boolean standalone to change while maintaining is synchrony with other Boolean values bound to her by name.  Any help on this would be highly appreciated.

    Here are the screenshots of the code that I used the 16 y 128 table

    Sincerely,

    Tax


  • How to assign array of Boolean values in LabVIEW?

    I want to assign array of Boolean values. IAM not able to do. For each Boolean I want to assign each value. Please help me...

    Thank you Mr President... He worked.but I'm stuck with the other problem.i created a 4-page tab control. How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

  • default Boolean value

    I have a Sub VI that I use to launch a panel where he made a few selections, then made hits.  What is happening inside a while loop.  I took the associated Boolean value the while loop and it connected to the output of the Sub VI.

    I use this subroutine inside my main VI VI, and what I'm trying to do is to hide the front panel of the VI main until the user presses 'Done' on the Sub VI.

    The problem is that even though I explicitly set the value of the Boolean false inside an imposing flat sequence, there always seems to be initialized in my main VI.  I say this because I put a probe and it simply says "Not executed" until I press the fact, how it becomes true.  I expect what follows 'false' until I pressed 'done '.

    I looked through the forum here and have also tried to set its default value with LabView, both without success.  If anyone can help?

    I have attached the VI Sub, and a picture of how I use it in the main VI.

    Thank you

    Stream!

    Your loop where hide you the front panel are not even starting to run your sub - VI has not completed.  You need to hide the front before you start your Subvi.  Then when your time strand begins, it will take place either once if the Boolean value coming is eternally true, or to run if the value Boolean false.

    In addition, there is no reason to hide the front panel in a loop structure.  You're going just to hide several times as fast as your processor will allow (then it would only do once or forever.)

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • How the Boolean value off the coast in the system bell auto College after 5 seconds?

    How the Boolean value off the coast in the system bell auto College after 5 seconds?... and also the Bell has to ring only the days... Please help me

    basically take the time, times of beginning and end, including the days of the weeks...

  • Displaying a Boolean value to 500 ms

    Hello world

    I am fairly new to LabVIEW programming, so I thought you could help me with a project for a course I'm taking.

    We are developing a VI Ridge detector to measure the time between and show the spikes in the ECG signal. For this, we use a Boolean indicator that lights up when a peak is detected. The only problem is, that the indicator would not light up (we have concluded that it's because of the sampling frequency is too high, so the entry goes from true to FALSE too fast to register, but feel free to comment on this finding). That's why I think that if it is possible to proceed to a Boolean value for a long period of time, let's 500ms, even if the indicator is powered FALSE logical values in the meantime?

    I hope you can help me and thanks in advance!

    Neergaard


  • A Boolean value of switching

    Cave of the var: Boolean;

    Cellar = true;

    If (cellar == true) {trace ("true") ;}

    If (cellar == false) {trace ("false") ;}

    cave_hit_area.onRelease = function () {}

    cellar = false;

    }

    Hi, I have trouble getting this work.

    All I have to do is flash to realize that the Boolean value is passed from true to false so that I can make another magic happens.

    I was hoping that changing just he would work... but now I think I'm probably missing something, or I'm going the wrong way on it... but I do not know... Hense why I need help on this one

    Any help on that would be great.

    See you soon

    If it is the way that you do makes sense to you or not, that does not work elsewhere. If you need to change your way of thinking a little bit. Your code becomes more complex (not in a good way) and becomes harder and harder to decipher and remember what it means and what is the case. And using things like _root make you so that it will be much more difficult to make changes in the future.

    So forget what I said earlier about how to manage a bunch of them, but if you have not a lot of them come back later. You'll be much happier.

    The part that I spoke only have an event handler is what is important. Do not try and assign two event handlers. Just assign one that handles both cases. So let's just do this as simple as possible. Forget all the other things you might want to do. Let's just do the star show and hide when you click cave_mc.

    First if your cellar or cave.value (not sure since you seem to continue to add properties) is just to keep track of know if the stars visible or not, why do you need that? You can just ask:

    trace (cave_star_mc._visible);

    Who will trace the value true if the star is visible, and false if it isn't. Do not try and follow something with another variable if you do not need to do. So we won't make any property of cellar.

    If the simpler version of the code would probably be:

    {cave_mc.onRelease = Function ()}

    cave_star_mc._visible =! cave_star_mc._visible;

    }

    The! means taking the opposite of what is the current value. So, if the star is visible now, it will be invisible and if it is invisible, it will be visible.

    If you have the variable for something else, and it might have a different value of the visibility of the star, then by all means make a new varaible. But give it a better name.

    Cellar and cave.value really are not very descriptive. And the code that you are showing seems to mix them. Or maybe that's not?

    If I ask someone "Cellar?" and they answer 'True '. That makes no sense. But if I like someone "isVisited?" or "isActive?" and they answer 'True '. It makes more sense.

  • Cannot convert the value &amp; quot; down &amp; quot; a Boolean value

    I am trying to establish why this example gives me an error, it is intended to demonstrate the ability to return one data type other than a Boolean value to a UDF but doesn´t seems to work. Why is this? I'm using cfmx7 who shouldn´t of importance that the UDF are cf5 + thank you for any response

    Hydrowizard wrote:
    > Thanks for the reply Phil, sorry I forgot to put the error message is
    > "unable to convert the"inferior"to a Boolean value. The return is partly false in
    > the code I got rid of him now, I thought that it was always
    > Thank you for this comment.
    >

    Have your resolved your error?

    If not, or for others in your so first paragraph:

    You not compare function for anything so try to SEE
    convert the returned value "below" in this case true or false.
    that is a Boolean and failing value. If she tells you that it cannot
    convert "down" to a Boolean.

    Now, it would give him no problem.

    But then I don't know what is really stable.

  • creation of the loop for a Boolean value

    Hello

    I'm still a beginner at so forgive me if this sounds simple...

    I created 16 Boolean values with all the false value.

    Now with a loop for, I try to create 16 buttons, and when each button is pressed, the respective boolean compared to this button will change to true. Looks something like below:

    Somehow, this does not work... someone can point me to an error in the coding? Thank you very much!


    Couple things...

    It is standard for a button work onRelease, not delivery.

    -at your service delivery made reference to the button. Not the root
    panel mounting as you probably want to target. The real problem, however, is the
    the reference to I in the button. If you do a trace (i); within the delivery
    you will find that each button will trace 17. This is because the button don't
    not to maintain a local reference to i - just button refer to the final
    value of i in the main timeline... it's called scope. Sometimes issues of concern
    can be a real challenge. What you need to do is to create a local variable
    in the buttons and I store it in this variable.

    for (var i = 1; i)<= 16;="" i++)="">
    This ["button" + i] .i = i;
    This ["button" + i] .onPress = function() {}
    This ._parent ['status' + this.i] = true;
    }
    }

    --
    Dave-
    Developer leader
    www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • Caveat "the formula uses a Boolean value instead of a number" would dismiss

    Hello!

    I do a "Calculator" to get estimates of price for the projects, according to which processes the customer wants.

    Rates for each process are added in another table, and I use the list of control buttons to enable or disable the various processes.

    Here is an example of a formula:

    D3 determines if the part of the project modeling is performed, so the price will be or will not be calculated.

    If D3 is true, the result is multiplied by 1, give me a positive amount. If false, the result will be multiplied by 0, 0, so nothing to add to the final cost he send me some.

    Same for B4 in the same formula.

    This formula is repeated all over the chart, with minor changes to add more complex options, but it's all the same.

    Everything works fine, but I got those blue triangles warning me of "the formula uses a Boolean value instead of the number". That's fine with me, I like the use of the Boolean types, and they make my formulas work well in my calculator. How can I reject the blue triangles?

    They are a little annoying. And they do not really correspond with the general style of my calculator.

    I saw someone talking other types of formulas, with SEARCH and yews, but who is really complicated and I don't know how to do... Especially for a simple calculator

    Is there a way to simply do not display warnings?

    Using the version 3.6.2 on a MacBook Pro, OSX El Capitan 10.11.5

    Thank you!

    Hi Sinshassan,

    I don't know a way to escape your blue flags except to make a formula which is consistent with the expected numbers. It is not difficult.

    My formula D2 = yew (AND(D1,B2), C2, 0)

    The IF statement tests the two D1 AND B2. If they are true, then it indicates the value of C2 your carbon Modeling::High Poly #1, if one or both are false (unchecked) then 0 is displayed.

    Give it a try.

    Quinn

Maybe you are looking for