You can use a variable as a variable name as you can do it in Perl?

So say there are 10 clips on the stage, each named mc1 mc2 mc3 etc. I have a function that sends the name of a movieclip in a public class, and I need to be able to change the image of this movieclip according to the string that is sent. Say so my class is the function declaration:

moveFrame (theMovieClip);

where theMovieClip is the object returned by another function.

Is it possible to use this variable somehow?

The concept of what I'm trying to do:

function moveFrame (s) {}

s.gotoAndStop ("the framework law");

}

Who is? Is this possible or should I find another solution?

If the argument of the function (s) pointing to the object, then your code as shown should work.

s.gotoAndStop ("the framework law");

If the argument points to the name property of the object, then you will need to use the getChildByName() method to target the instance.

this.getChildByName (s) .gotoAndStop ("the framework law");

If the argument is a string version of the name of the instanceobject, you can use the support rating to target the object...

This [s] .gotoAndStop ("environment law");

Tags: Adobe Animate

Similar Questions

  • Use a variable name in a function?

    Here's my function...

    myInterval = setInterval (TTMO, 15);

    function TTMO () {}
    InstanceNameOfMovieClip._x = (InstanceNameOfMovieClip._x - _xmouse) / 10;
    InstanceNameOfMovieClip._y = (InstanceNameOfMovieClip._y - _ymouse) / 10-2;
    }

    Can I use a variable name instead of using the "InstanceNameOfMovieClip"? I tried, but it does not work. I also tried to use the correct hierarchy, as this ._parent. VariableName too.

    you have to concat the link with the movieclip using your variable of string like this

    var mcName_str = "bigBox_mc";

    This [mcName_str] ._x = 20;

    You can use this method to loop through the objects named in an incremental way

    for (var i: Number = 0; i<>
    {
    This ["mc" + i] ._x = 20;
    }

    hope that helped

  • How can we use the variables name, for example?

    I use 9 textbox in my step. The names are similar, only difference is the last character. (s1_0, s1_1, s1_2,...). I am using these textbox in a loop. But I couldn't find the right typing... s1_ [i], (i) s1_ or s1_ {i} gives an error.

    s1_0.text = 0
    s1_1.text = 0
    s1_2.text = 0
    s1_3.text = 0
    s1_4.text = 0
    s1_5.text = 0
    s1_6.text = 0
    s1_7.text = 0

    How can he do the shortest hits for this problem?

    Use the operator [] table:

    for (var i: uint = 0; i<>

    This ["s1_" + i.ToString ()] .text = 0;

    }

  • WARNING: Incompatible Arg. You can't use stack Variables If generating series is not defined

    What does this message mean?

    "WARNING: incompatible Arg. you can't use stack Variables If generating series is undefined."

    Where can I put generate series only?

    Thank you

    Derek

    Hi Derek,.

    Not all LabVIEW C Generator settings are compatible with each other. In this case, you must define generate series only (aka 'disable parallel execution') If you want to generate the code uses the variable stack.

  • How many times can I use a variable binding in a query of the VO?

    Is it possible that I can use a variable binding in a query of VO just once?

    I test a query that keeps throwing the Houston-27122 error by pressing the application module tester. I tried to limit the problem to the simplest possible case, and it seems that the error is caused by the fact that I use the same variable bind two or more times.

    When the query looks like this:

    query1.png

    I have run, enter 'x' and it returns me the result.

    When I change to:

    query2.png

    I have run, enter the value

    param.png

    and immediately get the error

    error.png

    The same thing in sqlplus runs without problem:

    sqlplus.png

    My version of JDev is build JDEVADF_11.1.1.9.0_GENERIC_150314.0718.6673

    Please, advise.

    P. S. where can I find documentation queries are supported in your? In particular, I'm interested if I can use WITH the clause. There seems to be some confusion on this matter (see, for example, Oracle SQL WITH clause support - JDeveloper and ADF)

    Thank you.

    It depends on:

    Open your VO in JDev and go the the query page.

    In the lower part, there is a drop down 'link type', it is usually set to "JDBC-positional. In this case, you will need to provide the bind value for each occurrence of the variable binding separately.

    You could change that to "named" (don't remember the exact name). But beware, this will also affect all relatioships master retail to others your. I think that this is not a good idea to change the style of binding to a single VO.

    Good bye

    DPT

  • 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

  • Can I use session variables in data model BI publisher SQL query?

    Hi Experts,

    We apply security at the level of the BI Publisher 11g data.

    In OBIEE we do so using session variables, so I wanted to just ask if we can use the same session variables in BI Publisher as well
    That is, we can include a where clause in the SQL for the sample data as

    Where ORG_ID = @{biServer.variables ['NQ_SESSION.]} {[INV_ORG']}

    I would like to know your opinion on this.

    PS: We implement security EBS r12 in BI Publisher.

    Thank you

    Read this-> OBIEE 11 g: error: "[nQSError: 23006] the session variable, NQ_SESSION.» LAN_INT, has no definition of value. "When you create a SQL query using the session NQ_SESSION variable. LAN_INT in BI Publisher [ID 1511676.1]

    Follow the ER - BUG: 13607750 -NEED TO be able TO SET up a SESSION IN OBIEE VARIABLE AND use it IN BI PUBLISHER

    HTH,
    SVS

  • Can I use a variable in a slider?

    Version of DB 10g
    Developer SQL 3.

    Hi once again, everything

    This post is a result of the post previous 'Sequence increment by 2 and not 1.'

    Here's a quick run down of what I do.
    We have historical records dating back decades and decades and decades (1900). Some of the most recent data were recorded in the worksheets. With some manipulation of data, it was possible to reorganize the data in its forms of entry in a flat file. These data were then imported into Access database, then using SQL Developer I made a data base for each access database connection and used copy for Oracle... tool to create a table in my flat file schema. In test data that I have right now that I copied the 5 access to Oracle databases and the results are five paintings called plot_84, plot_151 etc. I created a database that contains four main tables where the data from the flat files must be inserted, to standardize the it (I think the sentence is).

    I with the help of a large number has been able to train the following anonymous block, and it works very well (with the exception of the question of sequencing).

    DECLARE get_plot_measurement_id NUMBER;
    update_plot_measurements VARCHAR2(4000);
    get_tree_id NUMBER;
    get_plot_id NUMBER;
    
    BEGIN
        --1. Initiate insert process by getting PK from psp_plots
        SELECT plot_id INTO get_plot_id FROM psp_plots WHERE plot_name = 84; 
        
        --2. Insert records into psp_plot_measurements and keep relationship with psp_plots with variable get_plot_id.
        --   and get primary key value of psp_plot_measurements to insert into psp_tree_measurements during loop process.
        INSERT INTO psp_plot_measurements (plot_id) VALUES (get_plot_id) RETURNING plot_measurement_id INTO get_plot_measurement_id;    
        
        --3. Update record created at point 2.
        UPDATE psp_plot_measurements
           SET measurement_date    = (SELECT DISTINCT measurement_date FROM plot_84)
             , codominant_height   = (SELECT DISTINCT codominant_height FROM plot_84)
             , assessor            = (SELECT DISTINCT assessor FROM plot_84)
         WHERE plot_measurement_id = get_plot_measurement_id
         ; 
      
        --4. Open cursor to insert rows one at a  time and maintain relationships between related tables.
        FOR c1 IN
          (SELECT tree_number 
             FROM plot_84
          )
          
          LOOP      
        
            --5. Insert record into psp_trees
            --   and get primary key value of psp_trees to insert into psp_tree_measurements
            INSERT INTO psp_trees (plot_id, tree_name) VALUES (get_plot_id, c1.tree_number) RETURNING tree_id INTO get_tree_id;
        
            --6. Insert records into psp_tree_measurements and keep relationship with psp_trees with variable get_tree_id.
            INSERT INTO psp_tree_measurements (plot_measurement_id, tree_id) VALUES (get_plot_measurement_id, get_tree_id);
        
          END LOOP;
    
    END;
    /
    But me being someone who loves jobs mind numbing again and again, and more (about 1000 times x, who knows) still wants something I can preload a list of arrays of flat file (5 in this example) and just not run it.

    The problem is the following:
    Can I use a variable in a cursor, how are hilighted in bold below.

    "BOLD" has not worked is the bit of code FOR c1 IN (SELECT tree_number FROM plot_ | col_name_var) you will see just under point 4 below
    DECLARE p_column_num NUMBER;
    col_name_var VARCHAR2(30);
    type number_ptb IS table OF VARCHAR2(4000);
    p_column_nam number_ptb;    
    get_plot_measurement_id NUMBER;
    update_plot_measurements VARCHAR2(4000);
    get_tree_id NUMBER;
    get_plot_id NUMBER;
    
    BEGIN
    
        p_column_num := 5;
        p_column_nam := number_ptb();
        p_column_nam.extend(6);
    
        p_column_nam(1) := 84;
        p_column_nam(2) := 151;
        p_column_nam(3) := 152;      
        p_column_nam(4) := 214;
        p_column_nam(5) := 283;
    
        FOR loop_int IN 1 .. p_column_num
        LOOP
    
          col_name_var := p_column_nam(loop_int);
    
    --1. Initiate insert process by getting PK from psp_plots
          SELECT plot_id INTO get_plot_id FROM psp_plots WHERE plot_name = col_name_var; 
        
    --2. Insert records into psp_plot_measurements and keep relationship with psp_plots with variable get_plot_id.
    --   and get primary key value of psp_plot_measurements to insert into psp_tree_measurements during loop process.
          INSERT INTO psp_plot_measurements (plot_id) VALUES (get_plot_id) RETURNING plot_measurement_id INTO get_plot_measurement_id;    
        
    --3. Update record created at point 2.
          update_plot_measurements := '
          UPDATE psp_plot_measurements
             SET measurement_date    = (SELECT DISTINCT measurement_date FROM plot_' || col_name_var ||')
               , plot_size_10_30cm   = (SELECT DISTINCT plot_size_10_30cm FROM plot_' || col_name_var ||')
               , plot_size_30_50cm   = (SELECT DISTINCT plot_size_30_50cm FROM plot_' || col_name_var ||')
               , plot_size_50cm      = (SELECT DISTINCT plot_size_50cm FROM plot_' || col_name_var ||')
               , codominant_height   = (SELECT DISTINCT codominant_height FROM plot_' || col_name_var ||')
               , assessor            = (SELECT DISTINCT assessor FROM plot_' || col_name_var ||')
           WHERE plot_measurement_id = ' || get_plot_measurement_id
           ;
     
           EXECUTE IMMEDIATE update_plot_measurements;
      
    --4. Open cursor to insert rows one at a  time and maintain relationships between related tables.
          FOR c1 IN (SELECT tree_number FROM plot_|| col_name_var )   
              LOOP      
        
    --5. Insert record into psp_trees
    --   and get primary key value of psp_trees to insert into psp_tree_measurements
                INSERT INTO psp_trees (plot_id, tree_name) VALUES (get_plot_id, c1.tree_number) RETURNING tree_id INTO get_tree_id;
        
    --6. Insert records into psp_tree_measurements and keep relationship with psp_trees with variable get_tree_id.
                INSERT INTO psp_tree_measurements (plot_measurement_id, tree_id) VALUES (get_plot_measurement_id, get_tree_id);
        
              END LOOP;
      END LOOP;
      
    END;
    /
    Reviews on my welcome code.

    Ben

    Published by: benton on Sep 1, 2011 11:31

    Published by: benton on Sep 1, 2011 11:32

    Published by: benton on Sep 1, 2011 11:34

    with your current model, you need to write once for each table or write dynamic SQL regardless of the bulk of collect. adding most collect simply means you can do all the inserts in a single step and generally average performance benefits (see docco to COLLECT in BULK and for ALL).

    However, it is not really solve your problem.

    can I suggest an ETL step where you move all of the data in a table, then cross and run this function on all resulting?

  • Can I use a variable, all referring to a text field?

    Hello

    I have to settle for some fields readOnly property DYNAMICALLY (I mean, until the moment of execution, I do not know which fields are read-only and which are not?  .

    So I want to replace the TextField1 dynamically with all the fields in the syntax below. So, can we put a variable in the position of TextField1? If so, how can I do that?

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField1') .access = "readOnly";

    xfa.resolveNode ("VISITOR. Page3.SubFrom1. MyVariableComesHere') .access = 'readOnly ';

    How can I put the variable in the Red position?

    In details:

    I have 5 fields, then I want to readOnly, then I hv to write as below,

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField1') .access = "readOnly";

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField2') .access = "readOnly";

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField3') .access = "readOnly";

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField4') .access = "readOnly";

    xfa.resolveNode ("VISITOR. Page3.SubFrom1.TextField5') .access = "readOnly";

    In fact, my requirement is differnent (I know at run time only... Wht wht fields I hv to set readOnly and wht wht fields should allow very good for entry), for this reason I want to use a VARIABLE in the 'position' of TextField1, TextField2... as bleow

    $myvariable var

    $myvariable = TextField1

    Closure of the TABLE

    xfa.resolveNode ("VISITOR. Page3.SubFrom1. myVariable') .access = 'readOnly ';

    Pls. Let me know I can sue a variable like this? If so, what is the correct syntax (pls.  Suggest me a free code to SYNTAX error, bcz am very very beginner to this)

    Thank you

    Thank you

    You can use the following...

    $myvariable var

    $myvariable = TextField1

    xfa.resolveNode ("VISITOR. (Page3.SubFrom1.' + myVariable + "") .access = "readOnly";

    Thank you

    Srini

  • can we use repository variables in bi publisher as in answers

    can we use repository variables in bi publisher as in answers

    If possible, how

    Yes,

    but you should use Oracle BIEE as data source in order to use the variable in the repository

    you will need to follow the following syntax: valueof ("variable")

  • Can I use a variable of environment inside a *.sql file?

    Hello

    I want to create an external table.
    Then I use the command
    create or replace directory abc as "C:\folder"... within a sql file.

    Now, I want "C:\folder" way to be dynamic I use this path in many other places also inside the sql file. So I thought to create an environment variable and set this value. I tried using like %Path% but it gives error... where % PATH%=C:\folder.
    Can I use a variable of environment inside a *.sql file?
    But how to do it or is there another way.


    Thank you
    Olivier

    Published by: user11018268 on February 19, 2010 01:03

    You can use a variable substitution:

    SQL> accept basedir prompt "input the base dir:  "
    input the base dir:  c:\exp
    SQL> create or replace directory exp as '&basedir';
    old   1: create or replace directory exp as '&basedir'
    new   1: create or replace directory exp as 'c:\exp'
    
    Directory created.
    
    SQL> create or replace directory exp_data as '&basedir\data';
    old   1: create or replace directory exp_data as '&basedir\data'
    new   1: create or replace directory exp_data as 'c:\exp\data'
    
    Directory created.
    
    SQL> create or replace directory exp_log as '&basedir\log';
    old   1: create or replace directory exp_log as '&basedir\log'
    new   1: create or replace directory exp_log as 'c:\exp\log'
    
    Directory created.
    
    SQL> select DIRECTORY_NAME, DIRECTORY_PATH
      2  from dba_directories;
    
    DIRECTORY_NAME                 DIRECTORY_PATH
    ------------------------------ ------------------------------
    EXP_LOG                        c:\exp\log
    EXP                            c:\exp
    EXP_DATA                       c:\exp\data
    

    Max
    http://oracleitalia.WordPress.com

  • Business rule can use replacement variables in Essbase?

    Hi all

    I use Hyperion Essbase, EAS and planning with the version 9.3.1.

    1 can. business rule we use replacement variables in Essbase?

    2. how to update the rule of business planning workspace changes?

    See you soon,.
    Simon

    Hello

    Yes you can use substitution variables, as calc scripts use the ampersand & and name of the variable, for example & CurrYr

    I don't know what you mean by the second question, if you make changes to the business rules in the environmental assessments, so that all you have to do, planning of calls is the same repository for information of business rule.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Can I use a variable in step of TS Message for field 'waiting time '?

    Is it possible to use a variable (inhabitants, parameters, etc.) for the field "Wait time" in the stage of message TestStand?

    TestStand 4.1

    Thank you

    Rafi

    Go to the step settings > properties > Expressions > Expression Pre and enter something like:

    Step.TimeToWait = Locals.MyTimeToWait

  • Correct way to use Bind variables when you use an interface to MS SQL Server

    Hey,.
    I have some difficulty to find how to use bind variables in a view, when you use an interface to MS SQL Server. For some reason when I use an ApplicationModule who has a library of MS SQL Server JDBC loaded and I try to click on OK when you change the following query:

    SELECT kit_status, component_id
    OF numbered_inv
    WHERE trialname =: 1

    I get an error stating that ' SQL Query Error Message incorrect syntax near ':'. JDeveloper is compatible with SQL server for bind variable as this query works fine if I replace the: 1 with a Word to say "Test test".

    Thanks in advance

    Edited by: NullCheck December 15, 2010 14:06

    Use positional JDBC Style Binding to bind variables
    Try to use? Instead of:
    As shown here:
    http://www.Oracle.com/technetwork/developer-tools/jdev/multidatabaseapp-085183.html

  • 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

Maybe you are looking for