Using the variable string quickly calling several variables

OK, I'm not entirely sure how to explain it, but I will do my best...

I have had several similar Boolean variables which are publicly declared at the beginning of my class.

for example

public var _ball0_mcPlaced:Boolean = false;
public var _ball1_mcPlaced:Boolean = false;
public var _ball2_mcPlaced:Boolean = false; 

This will determine whether or not a particular ball was placed in a target area.

Now I want to use this variable again in a function... However, I do not want to write in the variable for each ball in the service.

Is there a faster way to access this variable by using a string inside the function varibale?  Each ball becomes a target of the event if clicked, so I could use something like...

("_" + event.target.name + "Placé") to create the dependent variable on which ball is selected?
So, if ball0_mc is selected it returns the _ball0_mcPlaced variable?

How can I do this?


See you soon

It would be written using the array notation in the form of...

["_" + event.target.name + "Placé"] = true;

Tags: Adobe Animate

Similar Questions

  • How to change the value of string clustered, to implement using the node value of property instead of writing directly on the flow of data or using the variable

    new to labview :-) and I have a problem when I want to change the value of a string in bunches, and I want to implement this using the node value of property instead of writing directly to the stream or by using the variable, enclosed is the picture.   No matter, I have change in cluster (control) or value of Popery out (indicator) cluster, the value (sensor 7) dataflow keeps unchanged even I gave the new value by value of property node. Thank you to give me some advice about this.

    Hi GerdW

    Thanks a lot for your answer. The reason I'm stubbornly tring to break the flow of DATA is: we have a test system that have about 100 screws, they have a few connected flow, some of them will be unbundling a cluster dataflow chain to check the value in order to make the different cases.  Now I want to insert user event by changing the control and influential cases during run time.

    As I initially uses a global variable (to control cases) instead of unbundle string data flow, it works well.  But then, I found there are a lot of screws that are using the string unbundle.  One of the 'lazy' means, I tried is to change the value via the property node (because that way, I did not need to find all the places where using the unbundle string and replace them with the global variable), then I noticed a problem with "dataflow", the value in the stream of cluster in fact will not be changed by changing the value of the property node.

    I did a test with VI simple (like the picture in last post), and after reading your advice, I tell myself that I need to understand the concept of "DATAFLOW" in labview, it seems that my "lazy" way can not work in this scenario.

    I have attached the criterion VI here, have you furthur suggestions on what I can do in this case?

    Mant thanks!

    Minyi

  • Dynamically create a file using the variable

    HI, I am facing a problem in creating file on the time of execution using the variable.
    I have a variable file name. In the tab refresh, I wrote a query SELECT TO_CHAR (SYSDATE, 'YYYY, MM, DD') | 'TEST' FOR DOUBLE. I tested the variable and its value is correct.

    I've created an interface allowing to extract the data in the table and store it in the file. I assigned the variable file name in the file.

    Now when I run the interface... the file is created, but the header is created in different file and its name is ambiguous, g (19) and the data are placed in the other file with the name that matches the value of the variable filename...

    It is two ODI creates two files a single header and other data...

    When I run my interface in a package of the file created perfectly... but one i want to use package I want to create a file via the interface only running

    What is the name of the second file? (the file that does not have the name of the variable)

  • Execution plan will change if I use the variable binding instead of the literal value?

    Hi guys,.

    Suppose I have a select "... Of... WHERE ID = 2 and... "if I go to use the variable binding instead of the literal value 2," SELECT... " Of... WHERE ID =: p_id and... ", the execution plan change?
    I test multiple statements, the plan does not change, but I don't know if it would even as well as in some other cases.
    Someone at - it ideas?

    Thank you very much.

    Anneso wrote:
    Hi, sorry for the unclear post, it's 11 GR 2.

    As Sybrand already mentioned, there are a lot of change that came in the implementation of the bind variable in some versions of Oracle db. Since you're on 112, it is still true with the introduction of Adaptive Cursor Sharing . Please have a read on it since the post below written by the development of Oracle optimizer group.
    http://blogs.Oracle.com/optimizer/entry/why_are_there_more_cursors_in_11g_for_my_query_containing_bind_variables_1

    Aman...

  • You should have seen the date using the variable of presentation

    Hi all

    I am facing a problem in the display of the selected date of the guest in the report using the variable of presentation. I have a guest of data (calendar prompt), where the user selects the value. I take this value in the variable RBAP of presentation and report when I try to display this value using the same presentation variable, I get my date in the following format

    "TIMESTAMP 2010-10-22 00:00:00 '.

    I'm just using ' @{RBAP}' in the formula in the column.

    I want to show my date in the format DD/MM/YYYY. How to do this?

    I have used CAST (' @{RBAP} {' as DATE} and tried to change the data to dd/mm/yyyy format, but it does not work.)

    Please suggest

    Thank you
    Ronny

    in the default section to write the SQL...

    Select the OPTION case SENSITIVE WHEN 1 = 0 THEN AnyExistedDateColumn CURRENT_DATE of OTHER END OF SubjectArea

  • How to use the variable in the path of the source of an image in flex

    Hello
    I just want to know that how to use the variable in the path of the source of an image in flex

    Hello
    I just want to know that how to use the variable in the path of the source of an image in flex

  • When I use the library function node call in real time, is loaded only once for all or load the DLL whenever it is called?

    When I use the library function node call in real time, is loaded only once for all or load the DLL every time when it is called?

    I have a critical application in real time, in which I use a piece of DLL function developed in C++.  It is ok?  Make sure any senior developer?

    Thank you in advance.

    The user interface thread is the thread that is used to update the user interface. It's slow. And it's supposed to be that way because humans are slow.

    The call library function node can be configured as this thread to use in the configuration for it dialog box. Please visit the LabVIEW documentation on how to do this.

  • Cannot use the variable of environment with the API. DataWindow.Utilities.mShellAndWait

    When you run the following command in an event FDM script, an error occurs. If I specify the direct path (i.e. "D:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMAXL.cmd") the error does not occur. But if I open the command prompt and enter the path by using the environment variable (as in the script below), the MaxL script runs fine. It seems that causes an error when executed by API. . DataWindow.Utilities.mShellAndWait's - someone please have any suggestions as to how I can fix this?


    Error:
    Error: File not found
    Online: 77


    Script:
    «Call MaxL script to perform data clear the calculation.»
    Set objShell = CreateObject ("WScript.Shell")
    strCMD = "%EPM_ORACLE_HOME%\products\Essbase\EssbaseClient\bin\startMAXL.cmd" & strFilePath & ".mxl.
    API. DataWindow.Utilities.mShellAndWait strCMD, 0

    I don't think that vbScript will solve strCMD = "%EPM_ORACLE_HOME%\products\Essbase\EssbaseClient\bin\startMAXL.cmd" & strFilePath & ".mxl" correctly. I think that the environment variables can be solved in the interface. FDM is probably literally including the string "% EPM_ORACLE_HOME" in the path.

    If you share (read and execute) the file on the Essbase server that contains startMAXL.cmd (or containing a record of the ancestor of this folder), you can use the UNC path: strCMD = "------------"& strFilePath & ".mxl"»

    However, if startMAXL is installed on the server, FDM, you can use the local path to startMAXL.cmd.

  • Capture selected vales of Date dates invite you using the variable of presentation

    We have an obligation to display the date on the text of the report / whatever the user selects the date from the command prompt.
    We have a date called created and used operator is between.
    Can someone help me in this area, the use of variable presentation to capture the values of a single Date column of creation?

    In the criteria to add more than 2 columns for Date of creation
    and use these expressions foreach and hide them
    MAX (RMAX (creation Date))
    MIN (RMIN (creation Date))

    In your story view we will call @1 and @2. assuming that these 2 columns are first from left to right.

    No need to use variables of the presentation.

    Mark as correct

    Thank you

    Published by: Srini VIEREN on April 22, 2013 16:47

  • using the variable binding

    drop table tab purge;
    create table tab (number x, y varchar2 (5));
    Insert tab values(1,'rr');
    Insert tab values(2,'rr');
    Insert tab values(3,'rr');
    Insert tab values(4,'rr');
    commit;
    create or replace PROCEDURE get_data (p_data ON SYS_REFCURSOR,
    P_ID IN varchar2)
    is
    sql_str varchar2 (100): = ' SELECT * FROM tab WHERE. X IN (: x)';
    Start
    Open p_data
    for sql_str
    using p_id;
    end;
    /

    SET SERVEROUTPUT ON

    VAR A REFCURSOR
    VAR B VARCHAR2 (1000)

    EXEC get_data (: one, '3', 4);

    PRINT

    following error, so that the value of product produced no arrow.
    -------------------------
    ERROR:
    ORA-01722: invalid number
    -------------------------

    Here the implicit conversion does not work, and '3.4' is considered a stgring rather 2 separate values. I have to have to use bind variable and do not want to use dbms_sql. Is it possible, '3,4' is taken as 2-digit values, rather a string value helps Pl, thanks.

    You cannot use list as a bind variable. Use:

    SQL> create or replace PROCEDURE get_data (p_data IN OUT SYS_REFCURSOR,
      2  p_id IN varchar2)
      3  is
      4  sql_str varchar2(100) := 'SELECT * FROM tab WHERE tab.X IN (' || p_id || ')';
      5  begin
      6  open p_data
      7  for sql_str;
      8  end;
      9  /
    
    Procedure created.
    
    SQL> SET SERVEROUTPUT ON
    SQL>
    SQL> VAR A REFCURSOR
    SQL> VAR B VARCHAR2(1000)
    SQL>
    SQL> EXEC get_data(:A, '3,4');
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> PRINT A
    
             X Y
    ---------- -----
             3 rr
             4 rr
    
    SQL> 
    

    Or, if you want to use bind variable, use the composite type. Something like:

    SQL> create or replace
      2    type NumberList
      3      as table of number
      4  /
    
    Type created.
    
    SQL> create or replace PROCEDURE get_data (p_data IN OUT SYS_REFCURSOR,
      2  p_id IN NumberList)
      3  is
      4  sql_str varchar2(100) := 'SELECT * FROM tab WHERE tab.X member of :x';
      5  begin
      6  open p_data
      7  for sql_str
      8  using p_id;
      9  end;
     10  /
    
    Procedure created.
    
    SQL> SET SERVEROUTPUT ON
    SQL>
    SQL> VAR A REFCURSOR
    SQL> VAR B VARCHAR2(1000)
    SQL>
    SQL> EXEC get_data(:A, NumberList(3,4));
    
    PL/SQL procedure successfully completed.
    
    SQL> PRINT A
    
             X Y
    ---------- -----
             3 rr
             4 rr
    
    SQL> 
    

    SY.

  • Using the Variable more than once in a statement

    I tried searching but can't seem to find any other discussions where people have this problem.

    I use a select statement, and it contains, I have the same variable used several times. The problem is that when I run the statement, the substitution variable appears as many times as the variable appears in the declaration. It is not a show-stopper, but it's pretty boring. There is an option somewhere that I don't see who would do this work by popping only once?

    Normally you use bind variables (:) instead of substitution variables (&), but if you insist on using them, use DEF to define them before issueing your statement.

    Have fun
    K.

  • Automator: use the variable & selected as parameters for shell files

    I rarely use Automator, but it is useful to create services.

    I have a shell script that the tags of the files, and in a service, he travels the files selected in the Finder.

    What I can't get my head is the way to ask the user for the tag to be applied (either as a literal or choose from the list) and then pass this as the file list for the shell as a parameter.

    You're talking about text tags?

    You can use Ask for the text, and then set the Variable, then before run you Script Shell, Get Variable.  If this is the only variable passed, then it will be '$1 '.

    If you click on the [results] in the action before to run the Shell Script, you can see the order of the variables passed:

    Note: $1 should be quoted: echo "$1"

  • Use the variable based on Chncalculate to tiara

    I need to use a variable in the ChnCalculate function but only takes the text then how to incorporate the varaible in text inside this function. It keeps on undefined variable beep where, as I have already defined at the beginning of the program and also value.

    Hi coolguru,

    The syntax error is in your first line, it should be instead:

    GlobaDim "a".

    Brad Turpin
    Support Engineer product DIAdme
    National Instruments

  • Limit set using the variable

    IAM having the following query to load the data of my DataModel

    DataSource {
                id: firstSource
                source: "db/duDatabase.db"
                query: "SELECT title FROM how_to ORDER BY howToId ASC limit 10"
                onDataLoaded:
                    {
                        firstModel.insertList(data);
                    }
               }
    

    My Question is:

    How can I use a variable to set the limit in the query

    That is to say, I want something like that

     query: "SELECT title FROM how_to ORDER BY howToId ASC limit variableName"
    

    Please please help me. IAM stuck here.

    query: "SELECT title OF how_to ORDER BY howToId limit of ASC"+ NomDeLaVariable"

  • Cannot use the variable in the Interface.

    Hello

    I create a variable in the reference to 11g odi below

    V_name = FTClient

    DataType = alphanumeric

    default value = "BANK 1"

    I create a filter on the source table to pull records only for 1 BANK and talk CELL_SRC_TBL1. CLIENT = #FTClient in the filter.

    But when I try to execute its error display interface.

    "Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: lack of expression.

    Thank you

    Paul

    You use ODI 11? If so the name of the variable must bee all uppercase and when you pass too!

    I hope this can help you!

Maybe you are looking for