Simple for loops with the table?

Just a quick question!  I've been watching this for 2 hours and I searched everywhere, but always without success.

I have a simple table containing elements.  When the user edits the page, I want that these elements in the array to become visible.

var outfit:Array = ["Doll.Drawers.Shirt1", "Doll.Drawers.Pants1", "Doll.Drawers.Jacket1"];

function f_item_show(event:MouseEvent):void
          {
                    for(var i:int = 0; i < outfit.length; i++)
                    { 
                              trace(outfit[i]);
                              this[outfit[i]].visible = true;  // THIS IS THE ISSUE //
  
                    }
          }

The elements in the array are strings of the instance names, so I just need each string to be converted to an object and part .visible each element set to true.

I know my loop works properly, because the trace reads accurately each instance name in the list.  I thought that this part [] would solve my problem, but it's not... I get this error message:

TypeError: Error #1010: A term is undefined and has no properties.
          at PokeDress_fla::MainTimeline/f_item_show()

I know it's one line of code, because it works perfectly when I delete.  All my instance names are correctly labeled and added, because they are used many times in the code without flaw.

What I am doing wrong?

To use the stand of notation, each medium can only represent a single object, so you would need three media since there are three objects in your channel... which means you would need three tables.

If they appeal to target something inside the Doll.Drawers object, then you could simply store the shirts and pants and whatnot in the table as strings and use...

Doll.Drawers [outfit [i]] .visible = true;

What you should try instead is to store the actual paths to objects rather than representations of string of them, as in...

var outfit:Array = [Doll.Drawers.Shirt1, Doll.Drawers.Pants1, etc...

Then you should be able to use...

costume [i] .visible = true;

Tags: Adobe Animate

Similar Questions

  • For loops with the array variable

    I am using a loop for example with the name of the table in the select variable, but get a compilation error

    for current_aud_row in (select * from ' | table_name |' where...)


    table_name contains the name of the actual table

    I do that I get the name of the table as a parameter.
    Help, please!

    Excellent. Oracle APEX (Application Express) is a web IDE and RTS - it makes heavy use of DBMS_SQL to execute SQLs and restore these dynamically in the form of Web-based reports, or turn it into XML for graphical rendering using Flash software.

    DBMS_SQL is perhaps more complex (and only really necessary when it comes true dynamic SQL at all stages - including the result of SQL), but we must know how to use and apply. It is a valuable tool at times.

  • For loops with the cursor line and indexing

    Hi all

    I have a question about the loops with the cursor, line and indexing.

    How can I scan via a cursor with an iterator?

    I would use an iterator as

    Whole LoopIndex;
    Whole LoopIndex2;

    for LoopIndex at the beginning of the cursor at the end of the cursor
    loop
    line =: cursor [LoopIndex];
    for LoopIndex2 of LoopIndex at the end of the cursor
    etc...
    end loop;

    I need to use an iterator because I need to use a nested for loop.



    OR


    How can I solve the following problem?

    Class name % ofClass average test Score
    1 Niobe 7 8 8.4
    1 alena 4 7 7.5
    1 9 7 8.9 Estia
    1 Lilly 10 8 9.8
    1 Sandra 6 8 8.3
    1 Melanie 8 8 8.1
    Nadia 2 8 3 4.4
    Sayuki 2 9 8 8.4
    Diasy 2 7 8 8.0
    Flower 2 7 8 6.5
    Diana 2 6 8 7.3
    3 Flora 7 8 5.8
    Sukiya 3 4 8 8.4
    Samantha 3 10 8 7.7
    Roxanne 3 7 8 6.9
    Eline 3 8 8 7.4

    I need to
    -By class, I need to recalculate each average people
    -By class, I need to calculate the % of class score (sum averages / people in the class)

    So it can be done in a nested for loop?
    Or do I just step by step?

    Well, based on this information it would be something like...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as Class, 'Niobe' as Nm, 7 as Score, 8 as Tests, 8.4 as Average from dual union all
      2             select 1, 'Alena', 4, 7, 7.5 from dual union all
      3             select 1, 'Estia', 9, 7, 8.9 from dual union all
      4             select 1, 'Lilly', 10, 8, 9.8 from dual union all
      5             select 1, 'Sandra', 6, 8, 8.3 from dual union all
      6             select 1, 'Melanie', 8, 8, 8.1 from dual union all
      7             select 2, 'Nadia', 3, 8, 4.4 from dual union all
      8             select 2, 'Sayuki', 9, 8, 8.4 from dual union all
      9             select 2, 'Diasy', 7, 8, 8.0 from dual union all
     10             select 2, 'Blossom', 7, 8, 6.5 from dual union all
     11             select 2, 'Diana', 6, 8, 7.3 from dual union all
     12             select 3, 'Flora', 7, 8, 5.8 from dual union all
     13             select 3, 'Sukiya', 4, 8, 8.4 from dual union all
     14             select 3, 'Samantha', 10, 8, 7.7 from dual union all
     15             select 3, 'Roxanne', 7, 8, 6.9 from dual union all
     16             select 3, 'Eline', 8, 8, 7.4 from dual)
     17  --
     18  -- END OF TEST DATA
     19  --
     20  select class, nm as "NAME", score, tests, average
     21        ,round(((average*tests)+score)/(tests+1),1) as avg_person
     22        ,round((average / sum(average) over (partition by class))*100,1) as class_average
     23  from t
     24* order by class, nm
    SQL> /
    
         CLASS NAME          SCORE      TESTS    AVERAGE AVG_PERSON CLASS_AVERAGE
    ---------- -------- ---------- ---------- ---------- ---------- -------------
             1 Alena             4          7        7.5        7.1          14.7
             1 Estia             9          7        8.9        8.9          17.5
             1 Lilly            10          8        9.8        9.8          19.2
             1 Melanie           8          8        8.1        8.1          15.9
             1 Niobe             7          8        8.4        8.2          16.5
             1 Sandra            6          8        8.3          8          16.3
             2 Blossom           7          8        6.5        6.6          18.8
             2 Diana             6          8        7.3        7.2          21.1
             2 Diasy             7          8          8        7.9          23.1
             2 Nadia             3          8        4.4        4.2          12.7
             2 Sayuki            9          8        8.4        8.5          24.3
             3 Eline             8          8        7.4        7.5          20.4
             3 Flora             7          8        5.8        5.9            16
             3 Roxanne           7          8        6.9        6.9          19.1
             3 Samantha         10          8        7.7          8          21.3
             3 Sukiya            4          8        8.4        7.9          23.2
    
    16 rows selected.
    
  • How to move the Cursor parameter for loop with the type of table?

    Hi friends,
    I wonder how to pass a parameter into the second loop in the code example below. Please see the "BOLD" statements and to answer my questions.
    Thank you very much. Here's the code.

    declare
    l_bom_header_tbl BOM_BO_PUB. BOM_HEADER_TBL_TYPE; -TABLE TYPE
    V_bom_header_tbl Bom_Bo_Pub.Bom_Head_Rec_Type: = Bom_Bo_Pub.G_MISS_BOM_HEADER_REC; -Record type
    v_bom_components_tbl Bom_Bo_Pub.Bom_Comps_Tbl_Type: = Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL; - nested table type
    c: number = 0;
    k: = 1 number;
    Start
    BOMPXINQ. () Export_BOM
    P_org_hierarchy_name = > l_org_hierarchy_name,
    P_assembly_item_name = > l_assembly_item_name,
    P_organization_code = > l_organization_code,
    P_alternate_bm_designator = > '1Test. "
    P_Costs = > l_costs,
    P_Cost_type_id = > l_cost_type_id,
    X_bom_header_tbl = > l_bom_header_tbl,
    X_bom_revisions_tbl = > l_bom_revisions_tbl,
    X_bom_components_tbl = > l_bom_components_tbl,
    X_bom_ref_designators_tbl = > l_bom_ref_designators_tbl,
    X_bom_sub_components_tbl = > l_bom_sub_components_tbl,
    X_bom_comp_ops_tbl = > l_bom_comp_ops_tbl,
    X_Err_Msg = > l_Err_Msg,
    X_Error_Code = > l_Error_Code);
    If l_Error_Code = 0 then


    because me in 1... l_bom_header_tbl. COUNTING LOOP
    V_bom_header_tbl.organization_code: = "DSC";

    Can assign us a table type of guy like below the registration statement?
    V_bom_header_tbl.assembly_item_name: is l_bom_header_tbl (i) .assembly_item_name;.

    k: = 1;

    I want to pass the l_bom_header_tbl (i) .assembly_item_name parameter in the declaration below: How do I do this?
    for j from 1... l_bom_components_tbl. COUNTING LOOP

    Can assign us a table type of type array as below the statement?
    v_bom_components_tbl (k). Assembly_Item_name: is l_bom_header_tbl (i) .assembly_item_name;.
    k: = k + 1;
    end LOOP;
    end loop;
    end;

    Published by: ILovePlSql on March 22, 2010 07:51

    Published by: ILovePlSql on March 22, 2010 08:16

    ILovePlSql wrote:
    V_bom_header_tbl emp % rowtype;

    If v_bom_header_tbl has just two fields as ename, sal then also the assignment of type table, record type work or if the record type and the array type have the same structure?

    Yes:

    SQL> declare
      2      type Bom_Head_Rec_Type is record(ename emp.ename%type,sal emp.sal%type);
      3      type BOM_HEADER_TBL_TYPE is table of Bom_Head_Rec_Type index by binary_integer;
      4      l_bom_header_tbl BOM_HEADER_TBL_TYPE;
      5      V_bom_header_tbl emp%rowtype;
      6  begin
      7      select ename,sal bulk collect into l_bom_header_tbl from emp;
      8      for i in 1 .. l_bom_header_tbl.count loop
      9        V_bom_header_tbl.ename := l_bom_header_tbl(i).ename;
     10        V_bom_header_tbl.sal := l_bom_header_tbl(i).sal;
     11      end loop;
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    SY.

  • for loops with the name of the layer.

    I developed a script that checks if the layer color-101 exists in an open document.

    If the layer color-101 exists executes the block of code on layer color-101.

    If the layer color-101 are not running action Add layer color-101.

    Back at the beginning of the loop to check again

    I do it with a loop for and if statement.

    1. Why does the loop not stop when the loop count variable corresponds to the layer color-101 name variable?

    2. how the loop can return to the beginning to check again the presence of color-101 layer?


    Variable decalre

    app.activeDocument = docRef;

    var theLayer = "color-101;

    loop through the layers

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

    the layer name corresponds to the loop variable

    If (docRef.layers [i] .name == theLayer) {}

    Execute the block of code for layer color-101

    Alert ("Layer" + theLayer + "exist.");

    }

    }

    layer color-101 was not found, enforcement action Add layer color-101

    Alert ('The' + theLayer + "' there is no layer: Run Add layer color-101 action. '");

    back at the beginning of the loop and check again


    Your loop does not actually stop to find the right layer. He is content to display the alert popup window, then continues. Also the 'not found' - part will still raise. And the comparison must be 100% equal without difference case or spaces or 'copy 12' - suffixes.

    Try something like

    Declaring variables

    app.activeDocument = docRef;

    var layer_found = false;

    loop through the layers

    for (var i = 0; i)< docref.layers.length;="">

    var layer = docRef.layers [i]

    If (Layer.Name.toLowerCase (). IndexOf("case-101") > = 0) {}

    Alert ("found layer:" + layer.name);

    layer_found = true

    do what needs

    }

    }

    If (! layer_found) {}

    Alert ("Layer not found!");

    do what needs

    }

  • nested for loop in the collection

    Hi Experts,

    Collection1

    ============

    SELECT o.object_id

    LOOSE COLLECTION l_obj_info

    FROM (SELECT n.node_id, n.object_id

    N nodes

    START WITH n.node_id = 100

    N.node_id CONNECT BY PRIOR = n.parent_node_id) n

    JOIN IN-HOUSE

    objects o ON o.object_id = n.object_id

    WHERE o.object_type_id = 285;

    s Collection2

    ============

    SELECT *.

    LOOSE COLLECTION l_tab

    OF ((SELECT REGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))

    OF THE DOUBLE

    CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));

    END;

    collection3

    ============

    SELECT o.object_id

    LOOSE COLLECTION l_fin_tab

    Of objects o JOIN ATTRIBUTES att

    ON o.object_id = att.object_id

    WHERE o.object_id = collection1.object_id

    - AND att. VALUE = collection2.val;

    Please tell me how to implement for loop in the collection3 to get the values of collection1 and s collection2.

    I tried in the way below

    CREATE or REPLACE TYPE LIST_OF_ATTRIBUTES_TYPE AS TABLE OF THE varchar2 (4000);

    /

    CREATE or REPLACE TYPE LIST_OF_OBJECT_IDS_TYPE AS TABLE OF THE number (9);

    /

    (F_get_objects_by_type_id) CREATE or REPLACE FUNCTION

    i_object_type_id in NUMBERS

    i_l_text IN VARCHAR2,

    i_scope_node_id NUMBER

    )

    RETURN list_of_object_ids_type

    AS

    CURSOR objs_info

    IS

    SELECT o.object_id

    FROM (SELECT n.node_id, n.object_id

    N nodes

    START WITH n.node_id = i_scope_node_id

    N.node_id CONNECT BY PRIOR = n.parent_node_id) n

    JOIN IN-HOUSE

    objects o ON o.object_id = n.object_id

    WHERE o.object_type_id = i_object_type_id;

    l_tab list_of_attributes_type: = list_of_attributes_type ();

    -l_obj_info list_of_object_ids_type: = list_of_object_ids_type ();

    l_fin_tab list_of_object_ids_type: = list_of_object_ids_type ();

    BEGIN

    BEGIN

    SELECT *.

    LOOSE COLLECTION l_tab

    OF ((SELECT trREGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))

    OF THE DOUBLE

    CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));

    END;

    IF l_tab. COUNT > 0

    THEN

    BECAUSE me IN objs_info

    LOOP

    FOR j IN l_tab. FIRST... l_tab. LAST

    LOOP

    SELECT o.object_id

    LOOSE COLLECTION l_fin_tab

    O JOIN ATTRIBUTES att OBJECTS ON o.object_id =

    att.object_id

    WHERE

    att. VALUE = l_tab (j) and o.object_id = objs_info (i);

    END LOOP;

    END LOOP;

    END IF;

    RETURN l_fin_tab;

    END f_get_objects_by_type_id;

    /

    What this different problem from that of pls 00382 expression is incorrect, as they were returning a record type ?

    Please do not raise the same question several times. The answer is always the same. Your data model is seriously wrong - and that's the reason why you can't get data from it.

  • SLQ: A loop with the select line, counters and variables

    Hello!

    I have a bit of a pickle SQL and would be very happy to any experienced help.
    I have a big enough table that contains two columns in particular (illustrated by a few examples)

    REFERENCE
    Mouth Med Chem (2008) 16, 1111-1124
    Bioorg Med Chem Lett. 2008 may 1; 9:2820 - 4 EPUB 2008 Apr 4
    BR J Pharmacol. In February 1999; 3:665 - 72.

    2_ YEAR
    1996
    2001

    Sometimes, the two columns are null. What I want to do, it is to loop through the table and pull on the date of the REFERENCE column and update the YEAR_2 column with it.

    My current code snippet is as follows:

    declare
    x number: = 1995;
    cursor s1 is SELECT rowid, t.* FROM CB1ASSAYS t WHERE REFERENCE like "%x % ';
    Start
    While x loop < 2006
    C1 loop s1
    Update CB1ASSAYS set YEAR_2 = x
    where REFERENCE like "%x % ';
    x: = x + 1;
    end loop;
    end loop;
    commit;
    end;
    /


    However, it doesn't seem to work properly. He updated lines with 1995 in the year, but no date higher. Curiously, he updated a number of records with the year 2064, when there was no 2064 anywhere in the REFERENCE entry.

    There are no errors encountered when I run this script.

    Any idea?

    Thank you!

    In your code the where conditions update should be:

    WHERE REFERENCE like '%'||x||'%';
    

    and you can get rid of the slider at all:

    declare
     x number := 1995;
    begin
     while x < 2006 loop
       update CB1ASSAYS set YEAR_2 = x
       where REFERENCE like '%x%'
       AND YEAR_2 is null --To update only null years
       ;
       x := x + 1;
     end loop;
    --commit;  IT's better you you commit after checked if all is ok...
    end;
    /
    

    Max

    Published by: Massimo Ruocchio July 5, 2011 19:59
    got rid of the cursor loop for...

  • When to use the cursor for loop and the cursor (open, fetch, close)

    Hello world
    I have a small doubt about when to use the cursor for loop and when to use the cursor for loop and the cursor (open, fetch, close).
    Well, I'm not the difference between implicit and explicit cursor. So please tell me how I got to know, what to use and when?




    Kind regards
    BS2012

    Published by: BS2012 on January 29, 2013 12:15

    All SQLs are analyzed, stored and executed as cursors. Thus, you will always use a cursor.

    The problem is that languages, such as PL/SQL, provide different interfaces to interact with the SQL cursor. As the ref, the slider interface, the interface DBMS_SQL slider interface and so on.

    Each of these interfaces offers different features. For example, using the interface DBMS_SQL allows binding dynamics and dynamic recovery. The Ref Cursor interface allows your code PL/SQL pass a handle to a reference pointing to the SQL cursor, to an external client. Etc.

    The fundamental reason for the use of an explicit cursor interface is mainly that you own and manage bulk made extraction output provided by PL/SQL cursor.

    With a cursor FOR , the motor loop of PL/SQL optimize the loop by extracting block a 100 lines both. However, you cannot access this collection in bulk directly inside the loop.

    With an explicit cursor interface, you specify the size of the extraction in bulk via the clause LIMIT , and you set the variable of collection to use. This allows you to use the collection directly variable inside the loop.

    However, the need to do - code manually in bulk collection - rarely occur in the daily programs in PL/SQL. A line of treatment is both slow and not well fits. And even if your bulk code collects lines, these lines must still be processed one at a time in your code. It is much more efficient and scalable rather write SQL code, and make the engine SQL the line of treatment for you.

  • When I print a table (multiple pages) the text box under the table seems to be moving under the table and prints with the table of this overlap. My only solution is to push the text box further down the page before printing... Any advice?

    Im having problems shaped a text box so that my table does not print right on top of it. I want it inside of my table (it's 'tems and conditions' budget)

    Any advice would be great.

    I face the same problem as well. Would like to know if there is a better way to get the text box to move with the table instead of the effect that overlap. Have to manually adjust the layout, whenever I want to get a reasonable print of a document (or export it to PDF) seems counterintuitive, especially when it causes the document seem ill-disposed on screen.

    I am running version 3.6.2 of the numbers in the case where that matters.

  • Hello! Pro iPad comes with a specific set of fonts in Keynote? Or is it possible ad fonts, for example with the font book?

    Hello! Pro iPad comes with a specific set of fonts in Keynote? Or is it possible ad fonts, for example with the font book?

    This is a list of the fonts installed in iOS 7, as far as I know, it has not changed for iOS 9.

    iOS 7: List fonts - Apple Support

    Fonts are embedded in the iOS, a few Apps will bring new fonts when loading the application. Keynote will use those that are pre-loaded with iOS. There are third-party fonts that can be installed, but you will need to check that they are working with the speech of the seller of these fonts.

  • I've updated for picture with the captain and when I plug in my iPhone it loads the same pictures twice each time how it stop loading the same things every day?

    I've updated for picture with the captain and when I plug in my iPhone it loads the same pictures twice each time how it stop loading the same things every day?  I tried to make the old default iphoto but picture still open when I plug in my iPhone?

    I tried to make the old default iphoto but picture still open when I plug in my iPhone?

    When the iPhone is connected and Photos opens, select iPhone in sideba of the windowr of Photos. Then, uncheck the option 'Open for this iPhone Photos' below the toolbar.  Do this for all your iPhones. The hook should be unmarked for each device individually.

  • CVI suggested help update on 'programming with the Table controls.

    Hello

    May I suggest adding a sentence to the chapter 'Programming with the Table controls', 'Creation and deletion of cells' section help of CVI.

    After the sentence "use the following functions to control the number of rows in a table control...". "I would like to add a suspicion that the number of lines is also affected by (programmatically) adjustment of the height of the table.

    Now that I've discovered, it's obvious ;-)

    Hi Wolfgang,.

    I think you might be misunderstanding this sentence in aid. It does not refer to the size of the table, in regard to the number of lines go in the table. It is in fact the number of real lines exist in the table. And the total number of rows in the table is absolutely not affected by the height of the table.

    Luis

  • Any camera regardless of the interface is available for use with the LabView interface.

    Hello

    I intend to go for some CMOS camera,

    but I have a huge doubt before buying, the camera of menttioned above is not anywhere in this list. Nor can I see any type being supported USB device.

    The question is

    1. is a camera regardless of the interface is available for use with the LabView interface?
    2. Can I build a VI to communicate with any device image and recording of camera and take the data?

    Any kind of help or advice is greatly appreciated... I have to buy a CMOS camera and begin to run.

    Thank you...

    Hello Virginia,.

    I am pleased that this information has been useful, one thing I wanted to mention is that USB 3.0 has its own standard USB 3.0 Vision which is currently not supported. If this camera is also Direct Show compatible then you will be able to acquire an image using IMAQdx and manipulate all the attributes that are published to the API Live Show.

    I hope that USB 3.0 Vision will be supported in the near future, and we tentatively announced for this standard of communication for the August 2013 Vision Acquisition Softwareupdate.

    See you soon,.

    -Joel

  • Has anyone found or written a "Win 7 USB driver" for use with the Olympus C-3000Z digital camera?

    Has anyone found or written a "Win 7 USB driver" for use with the Olympus C-3000Z digital camera?

    On Fri, 28 September 2012 18:02:40 + 0000, bertcoy wrote:

    Has anyone found or written a "Win 7 USB driver" for use with the Olympus C-3000Z digital camera?

    Looking at the website of Olympus, it would appear that we do not
    There are.

    But you do not need a driver because you do not need to connect your
    camera to the computer. Just put the memory card in a card reader and
    access like this instead. I prefer to do it with my camera,
    because it is easier, faster and uses no battery in the camera.

    Ken Blake, Microsoft MVP

  • INS-06003: failure of connectivity SSH without password for installation with the following

    Dear all,

    I am in the process of installing Oracle 11 g on Redhat Linux 2 grid Infrastructure.
    I have installed ssh on both RAC nodes and when I run

    SSH - p7547 racnode1 "date; hostname ".
    SSH - p7547 racnode2 "date; hostname ".

    I get the date and the hostname without error on both nodes.

    But during the installation of the grid, I get this error message:

    INS-06003: failure of connectivity SSH without password for installation with the following nodes: [racnode1, racnode2]

    My thought is that it is because of the port has changed 22: 7547 but where them specify this port in the configuration of the CARS?

    I also get this information in the Setup log:

    WARNING: Could not establish a SSH connectivity with node racnode1. Reason: java.net.ConnectException: connection refused

    Kindly help on that.

    Kind regards
    Imran

    misterimran wrote:
    Dear all,

    I am in the process of installing Oracle 11 g on Redhat Linux 2 grid Infrastructure.
    I have installed ssh on both RAC nodes and when I run

    SSH - p7547 racnode1 "date; hostname ".
    SSH - p7547 racnode2 "date; hostname ".

    I get the date and the hostname without error on both nodes.

    But during the installation of the grid, I get this error message:

    INS-06003: failure of connectivity SSH without password for installation with the following nodes: [racnode1, racnode2]

    My thought is that it is because of the port has changed 22: 7547 but where them specify this port in the configuration of the CARS?

    I also get this information in the Setup log:

    WARNING: Could not establish a SSH connectivity with node racnode1. Reason: java.net.ConnectException: connection refused

    Kindly help on that.

    Kind regards
    Imran

    You can have the file/etc/ssh/ssh_config, where the default port is set at 22. Replace with 7547 and try ssh racnode1 "date; hostname". If it works, then it contains the definition, you may need to perform.

    Kind regards
    Julien

Maybe you are looking for