LVOOP - 1 table of Parents in several bays of the child?

I have 3 types of channels in my system. DI, I and AO.

I want to create a Parent class that has 3 children for each of my types of channels.  It's because I want to store (on disk using flatten chain) all my channels together as an array of strings.  It's ok because I can use the 'to the more generic class"and a record in a table of my parents (CHANNEL class).

The problem is when I read this array of objects.  I can read my array of objects parent but then I want to transform my array of objects of string into an array of objects, an array of objects HAVE and an array of objects of the DI AO.

Any ideas?  Thank you.

Lewis_G wrote:

Hi nathand thanks for the ideas.  I've implemented it as you sugested.  Is there a way to make it more scalable?

You might abuse the primitive preserve Run-Time class, as shown below. This divided the table parent tables separated for each class of the child, but the type of each element of these tables is always the parent type, even if they are transporting children. Not sure if that's what you want, or not.

Lewis_G wrote:

The child the more classes i, messier, fine.  Even if the code is the same for both, I can't have a Subvi generic because the child class is different for the two.  Don't you think it's a good idea to have a new class of table for each child.  For example, I could make a class with a method that has a channel enter parent and trys to add it to the guard?

This could be very good, if it meets your needs.

Intaris wrote:

nathand wrote:

Otherwise, add a method to the class called parent Type Get and override it in each class of the child, and then call on each element of the array to determine its type.

And make sure that the type is a string, otherwise problems ensure later in life...

I thought to mention that when I offered everything first, but then I thought that there could be situations in which an enum would work very well if you don't mind violating good OOP practices. Yes, the parent should know his children and you need to know about all children at design time, but if you can accept these terms then an enum is simple. I'm undecided about whether I would never apply this solution if I were to try to solve this problem in my own code.

Tags: NI Software

Similar Questions

  • Get the Parent for each record in the child

    Dear Experts,

    I have a table that contains the parent and child information. I need to make a request to get the parents of each book of the child table. I tried to write the query but does not get the expected results. Please help me.

    Table: relationship

    Parent of the child

    102 101

    103 102

    104 103

    106 105

    107 106

    109 108

    110 109

    Output:

    Expected child

    102 101

    103 102; 101

    104 103, 102, 101

    106 105

    107 106; 105

    109 108

    110 109

    Thank you very much

    Hello

    MU * 443499 * TR wrote:

    Dear Experts,

    I have a table that contains the parent and child information. I need to make a request to get the parents of each book of the child table. I tried to write the query but does not get the expected results. Please help me.

    Table: relationship

    Parent of the child

    102 101

    103 102

    104 103

    106 105

    107 106

    109 108

    110 109

    Output:

    Expected child

    102 101

    103 102; 101

    104 103, 102, 101

    106 105

    107 106; 105

    109 108

    110 109

    Thank you very much

    Why do you want to

    Expected child

    -----  ---------------

    110 109

    Instead of

    Expected child

    -----  ---------------

    110 109; 108

    ?

    You may want something like this:

    CONNECT_BY_ROOT SELECT AS children

    SYS_CONNECT_BY_PATH (parent, ';')  AS expected_output

    FROM table_x

    WHERE CONNECT_BY_ISLEAF = 1

    CONNECT BY child = parent PRIOR

    ;

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

  • Problem with a VM server: "the virtual disk parent has been changed since the child was created.

    Hello!

    I have a problem with a server that does not start.

    We had a virtual machine running on VMWare Infrastructure 3 with two hard drives and an instant backup of them.

    This machine has been removed from the inventory, but when it has been recreated, the secondary hard drive is mentioned for the basic-disk vmdk
    instead of being referenced to the instant vmdk and used for a few days.

    All changes made after the snapshot, were kept in the delta snapshot file, which is not loaded.

    We are with difficult to reference the secondary disk for the snapshot file. We tried to edit the .vmx and hard disk files
    to correct the CID made reference, but when we try to start the virtual machine, we got this error:

    "The virtual disk parent has been changed since the child was created.

    I think it happens because we made a blow-up of a secondary drive a few weeks after the backup snapshot. We spent 30 GB to 50 GB.
    And because it has been referenced and used in another vm.

    *** Log is attached

    Thank you

    Bruno.

    It is a bad sign

    next step in the usual forest is to use "testdisk" since a LiveCD to set the tables MBR and partition - if possible

  • parent of interpolation for putting the child at the center of the scene

    I worked on an interactive map of counties in Montana.  When a user clicks on a County, I would like the map to zoom in on the extent of the County and Center it on the stage.  Each county is a child of a larger container (the State, the allcnt_mc names).  I created things in my function so that when you click on one POINT the County variables with all the numbers you need are created.  I can not get the desired effect, and I think that I'm missing something basic with respect to the geometry of my step.  Can we see something that I am missing?  I created this so that the parent is interpolated to a new location equal to the center of the stage under the child called x, distance y from the center of the stage.  Essentially, it must be centered on the center of the scene, no child?

    function tweenparent(e:MouseEvent):void{
         //create vars for x,y cordinates of clicked county (child)
         var calledx:Number=allcnt_mc[xmlData.row.NAME[e.currentTarget.ivar]].x;
         var calledy:Number=allcnt_mc[xmlData.row.NAME[e.currentTarget.ivar]].y;
         //create a point of called child and convert to parent's space (parent=allcnt_mc)
         var cldpt:Point=new Point(calledx,calledy);
         cldpt=allcnt_mc.localToGlobal(cldpt);
         //x and y coordinates of parent
         var allcntx:Number=allcnt_mc.x;
         var allcnty:Number=allcnt_mc.y;
         //x and y coordinates of stage center
         var stagecentx:Number=stage.width/2
         var stagecenty:Number=stage.height/2
         //create variable of new point where parent should be centered in order to have child centered over stage
         var goto:Point=new Point(stagecentx-(cldpt.x-stagecentx),stagecenty-(cldpt.y-stagecenty));
         //tween parent so that child is centered over stage
         TweenLite.to(allcnt_mc,.5,{x:goto.x,y:goto.y});
    }
    

    Thanks for all your help people...

    -j

    What I offered involves the scaling of the child, not the parent.  The parent will scale compared to its registration point, so you should have to do a kind of continuous adjustment which can be visually detectable... scaling of nervousness and complicated to manage.

    For the parent appear across would be better done by having the parent in another container, where the container is always centered and the parent is moved inside, such as the County is centered as usual, but the container gets put on the scale, not the parent.

  • NOTHING will work when parental controls are enabled for the childs user account

    Won't launch any program on any user account that has parental controls enabled (via admin = ME)! IE, itunes, has even had a few background apps prevented such as COM Surgate, SMBus and a framework any not load. ALL these loading without probs when parental control is not activated (off) and all these programs work in the State of admin as well.

    Scratchin my head here

    http://www.bleepingcomputer.com/tutorials/tutorial139.html

    Go to the tutorial above on this and see if you missed a step in putting in place.

    See you soon.

    Mick Murphy - Microsoft partner

  • Virtual disk parent has changed since the child was created.

    I recently had one of my virtual machines go down and I couldn't connect to access anything whatsoever, so I rode as an extra hard drive to another virtual machine in order to access the data I needed.

    Once I had finished I he took off the other VM and proceeds to the power on the virtual machine, but I got an error of:

    "The virtual disk parent has been changed since the child was created." The content of the virtual disk ID parent does not match the ID of parent matching the child content. »

    Reason: The virtual disk parent has changed since the child was created. The content of the virtual disk ID parent does not match the ID of parent matching the child content.
    Cannot open disk ' / vmfs/volumes/4e24c6fe-3c2ad61e-a57c-e4115bbbce6c/SNCTrillium/SNCTrillium-000003.vmdk' or one of the snapshot disks it depends on.

    I read upward through the knowledge base of VMWare on the modified files, but I've never had to do that before and I'm not sure about how to go on this subject as I've never used the vsphere CLI either.

    I am currently using ESXi 5.0.0 with vsphere client 5.0.0. I've attached a screenshot of the error.

    According to the snapshot between SNCTrillium - 000001.vmdk and the basic disk SNCTrillium.vmdk is broken, which means that the basic disk has been changed. I have attached an instant replacement for the SNCTrillium - 000001.vmdk with a fixed string that should allow you to open the virtual machine. However, since I do not know what and how much data has changed on the basic disk, I can't tell you how much data corruption, you will see. So you better take an another snapshot to be temporary once loading hard file attached, in order to ensure the current hard data files cannot be changed.

    André

  • When Parent, the child is not getting saved.

    Hello
    I have 2 entities

    Public parent()
    {
    int A;
    int B;
    Child of the child;

    @ManyToOne (waterfall = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn (name = "child_id", nullable = false)
    public child getChild() {}
    Return this.child;
    }
    }

    public Child()
    {
    int child_Id;
    int Y;
    The value < Parent > parents;

    @OneToMany (fetch = FetchType.LAZY, mappedBy = "child")
    public Set < Parent > getParents() {}
    Return this.parents;
    }

    }

    Then
    Parent P = new Parent();
    Class c Child = new Child();
    ....
    I put values for classes of the mother and the child
    p.setChild (c);

    So, when I save the parent class

    entityManager.persist (parent);

    Ideally, it should save the child. But she got the following error. My mapping entity were not manually written. They were generated by eclipse. So I guess that as long as the database mapping is correct by the entity mapping will be also correct.

    +
    Caused by: openjpa - 1.1.1 - SNAPSHOT-error no fatal store r422266:807362 > org.apache.openjpa.util.StoreException: ORA-02291: integrity (PARENT_R03) violated constraint - found parent key
    {prepstmnt 4234 INSERT INTO PARENT (A, B, CHILD_ID) VALUES (?,?,?,?,?,?,?)} {[(null), (null) null, null, (BigDecimal) 58608]} [code = 2291, State = 23000]
    FailedObject: com.ejb.entity.Parent@337261
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)
    at kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:214)
    at kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:112)
    at kodo.jdbc.kernel.BatchingPreparedStatementManager.flush(BatchingPreparedStatementManager.java:72)
    at kodo.jdbc.kernel.AutoOrderUpdateManager.flush(AutoOrderUpdateManager.java:84)
    at kodo.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:68)
    at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
    at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:549)
    at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
    at org.apache.openjpa.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:554)
    at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
    ... more than 49
    +
    As you can see the CHILD_ID was generated. But I think that the order in which it gets commited is different. Please let me know if I need to change the configuration of my entity to make it work.

    Jebus, a column of ID of BigDecimal. You must have the intention to store the whole universe in there. I never managed to go on a primary key to precision 10 sequence generated to myself...

    Same difference: sound in rear. You have a card with a RfuiRfDef child and a child of RfuiRfDef belonging to many cards. Huh?

    In this scenario, I see only one true way to persistence it.

    -persist RfuiRfDef child object to a managed JPA entity
    -assign the child entity MANAGED RfuiRfDef to RfuiRfLgcMap object
    -persist RfuiRfLgcMap object to a managed JPA entity
    -to be complete, paste the RfuiRfLgcMap parent entity at the address now managed in the game of rfuiRfLgcMaps of the child object

    That translates into SQL statements; You cannot persist the Map object when there is firstly a RfuiRfDef record so you can store a foreign key relationship itself.

    I see a waterfall ALL slapped on everything (this is not recommended, don't use generated code as is the case, you must understand what it all does and adjust according to what is safe and necessary) - maybe it will work if you persist in fact the object of RfuiRfDef as follows:

    -create the child object RfuiRfDef
    -create the RfuiRfLgcMap object (with the game in the RfuiRfDef object)
    -stick RfuiRfLgcMap object in the game of RfuiRfDef.rfuiRfLgcMaps
    -persisted child object RfuiRfDef

  • Help, please! Snapshot after expand VM, virtual disk parent has changed since the child was created

    OK, here's the situation, (maybe you can find a lot of discussion on this one)

    I have a vmware server running SuSE Linux Enterprise Server 10. I use as its host vmware ESX 3.0.1.

    I realize that I need to extend the drive because he must have more space disk for the production server. Then I resize the disk using vmkfstools x 90 G TARANTELA - TEST.vmdk. The bad news is, I didn't know that the server has a snapshot on VI client. As you know, the error occurred:

    Failed to open the disc

    "/ vmfs/volumes/4652e777-3eb2a038-8fce-0019bb343796/TARANTELLA-TEST-000007.vmdk" or one of the snapshot disks it depends on.

    Reason: The virtual disk parent has been changed since the child was created

    Then I remove the snapshot of the VI client and re-save the virtual machine to inventory, but it may yet open the disc unless I edited the .vmx line file:

    scsi0:0. FileName = 'TARANTELA-TEST - 000007.vmdk '.

    TO

    scsi0:0. FileName = ' TARANTELA - TEST.vmdk.

    It runs as the first time I installed the system, but all the important configuration is in 'TARANTELA-TEST - 000007.vmdk' snapshot.

    Someone there the sollution, how can I do my work of snapshot again?

    Kind regards

    Arfal

    In SL32-AP-TARANTELA - TEST2.vmdk

    change

    CID=dc621992
    

    TO

    CID=ce700012
    

    and

    RW 188743680 VMFS "SL32-AP-TARANTELA-TEST2-flat.vmdk"
    

    TO

    RW 31457280 VMFS "SL32-AP-TARANTELA-TEST2-flat.vmdk"
    

    and

    ddb.geometry.cylinders = "11748"
    

    TO

    ddb.geometry.cylinders = "1958"
    

    in SL32-AP-TARANTELA-TEST2 - 000007.vmdk

    change

    RW 188743680 VMFSSPARSE "SL32-AP-TARANTELA-TEST2-000007-delta.vmdk"
    

    TO

    RW 31457280 VMFSSPARSE "SL32-AP-TARANTELA-TEST2-000007-delta.vmdk"
    

    And then you change the changes you have made to the VMX file.

    Try power o the VM - you will get probably mistakes (inside the virtual machine).

    If this works report back (we are not yet made).

  • Save several bays of nested loops

    Hello

    My vi generates several bays in each iteration of the loop, and I would like to save the data. I did work with the files before recording, but it's never with nested loops. I don't know how to keep the information of the iteration of one loop at the other. I would like suggestions. I made this sample & simple vi (attached file) that simulates the question I have. I have a file with a time column and different columns of food beside him.

    The first question I have is that I generate the time table only once, but a table of signal several times, so how can I keep the time table to drop several times? The other question, as stated above, saves the data in the table signal getting lost in the nested loops...

    Thank you

    A

    1. the first element of the first matrix signal IS always zero.  The Signal to simulate always starts at zero.  You compare it to the indicator of "first date".  Who got by converting the dynamic data type to a scalar.  And it's always the last element of the actual data.  And since the "first out" is replaced with each iteration of the inner loop, the number you see at the end is actually the latest iteration of the data.  Look at "First release" in comparison with the last element of your last column of the table and you will see they are the same.

    2. the reason why you have a first column that consists of the steps is because that's what you have wired to initialize the shift register.  If you look at my example, you will see that I have an empty array.  (The zero is gray.)  You, the 0 is not dimmed meaning there is an element.  Expand this table to view more items and expand the digital field and you will see more digits.  They correspond to what is in your first column.

  • How can I make sure that changes in a primary key (in the parent table) would also appear directly in the FOREIGN KEY in the child table?

    Forgive my question. I am very new to Oracle.

    How can I make sure that changes in the key primary supplier_id (concerning the supplier table) would also appear directly in the FOREIGN KEY (supplier_id) in the products table?

    Is that not all the primary key and FOREIGN KEY on?

    My paintings:

    I created 2 tables and connect to apply in the data base referential integrity, as I learned.

    CREATE TABLE - parent provider

    (the numeric (10) of supplier_id not null,)

    supplier_name varchar2 (50) not null,

    Contact_Name varchar2 (50).

    CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)

    );

    CREATE TABLE - child products

    (the numeric (10) of product_id not null,)

    supplier_id numeric (10) not null,

    CONSTRAINT fk_supplier

    FOREIGN KEY (supplier_id)

    REFERENCES beg (supplier_id)

    );

    I inserted the following text:

    INSERT INTO provider

    (supplier_id, supplier_name, contact_name)

    VALUES

    (5000, 'Apple', 'first name');

    I expect that the supplier_id (5000) to the provider of the table also appears in the products table under key supplier_id having the same value which is 5000. But this does not happen.

    How to get there?

    Thanks in advance!

    Hello

    What is a foreign key in Oracle?

    A foreign key is a way to ensure referential integrity in your Oracle database. A foreign key means that the values of a table must appear also in another table.

    Ok!??

    What is now the right way to implement referential integrity in your Oracle database that the values of a table must also be included in another table?

    A foreign key referential integrity indeed enfore in ensuring that the value in the child table must have a corresponding parent key (otherwise you will encounter an error, as evidenced by "SomeoneElse"). However, it will never automatically insert a row in the other table.

    If you are looking for a solution that automatically inserts a record in the other table, maybe you should go for triggers:

    See:

  • IOM 9.2 Child Table appears several times in the mappings of reconciliation

    Hello.
    I encounter this problem:

    Imported a resource from one computer to another,

    The resource has only one child form UD_PROFILES

    When I m generating maps of reconciliation in the seating process definition shows UD_PROFILES more than 10 times.
    When I map the table to one of those events of Reconciliación say MULTIPLE MATCHES table CHILD and does lie not the event are not linket to the user.

    I think there must be some kind of database problem (the definition girl line is several times in the database), but don't know where to look, and then remove them.

    Any ideas?

    Thank you.

    Check in the table in the SDH. Should not have more than one entry.

    Published by: Rajiv Dewan

  • Read the column of XMLTYPE with Parent and several child nodes

    Hello

    I have an xmltype column which stores the data in the format below. There is possible that some of the parent node will have several child nodes. I'm not able to extract children nodes. Get the error as a value of type multiset... required singleton...
    I tried the sub query, but it returns only the records from parent with children nodes.

    < CrntRgstns >
    < CrntRgstn empStDt = '2000-08-21' Auth = 'ABCD' regCat = 'BM' u4FlngDt = '2011-05-12' stDt = '2011-11-08' st 'EMPTY' = actvReg = "N" updateTS = "2011-11 - 08T 00: 37:42" >
    < CrntDfcnys / >
    < / CrntRgstn >
    < CrntRgstn empStDt = '2000-08-21' Auth = 'ABCD' regCat = 'BM' u4FlngDt = '2012-01-13' stDt = '2012-01-13' st = 'DÉFICIENT' actvReg = 'Y' updateTS = "2012-01 - 13 T 18: 02:19" >
    < CrntDfcnys >
    < CrntDfcny dfcnyCd = "TEST" exmCd = "M10" createDt = "2012-01-13" / >
    < CrntDfcny dfcnyCd = "TEST" exmCd = "X 40" createDt = "2012-01-13" / >
    < / CrntDfcnys >
    < / CrntRgstn >
    < CrntRgstn empStDt = "2000-08-21" Auth = "XYZ" regCat = "SU" u4FlngDt = '2012-01-13' stDt = '2012-01-13' st = 'DÉFICIENT' actvReg = 'Y' updateTS = "2012-01 - 13 T 18: 02:19" >
    < CrntDfcnys >
    < CrntDfcny dfcnyCd = "TEST" exmCd = "M10" createDt = "2012-01-13" / >
    < CrntDfcny dfcnyCd = "TEST" exmCd = "X 40" createDt = "2012-01-13" / >
    < / CrntDfcnys >
    < / CrntRgstn >
    < / CrntRgstns >

    I tried to use 2 xmltable querys and using the child node of the xmltable 1 as input to xmltable 2. But it returns only the records that has child nodes. But I wanted all the records of CrntRgstn and if no child node CrntDfcnys so that also displays.

    Thank you
    Vinod K

    I tried to use 2 xmltable querys and using the child node of the xmltable 1 as input to xmltable 2. But it returns only the records that has child nodes.

    You're almost there, you just have to do an outer join:

    SQL> select x1.empStDt
      2       , x1.Auth
      3       , x1.regCat
      4       , x2.*
      5  from documents t
      6     , xmltable(
      7         '/CrntRgstns/CrntRgstn'
      8         passing t.xmldoc
      9         columns empStDt date         path '@empStDt'
     10               , Auth    varchar2(30) path '@Auth'
     11               , regCat  varchar2(2)  path '@regCat'
     12               , CrntDfcnys xmltype   path 'CrntDfcnys'
     13       ) (+) x1
     14     , xmltable(
     15         '/CrntDfcnys/CrntDfcny'
     16         passing x1.CrntDfcnys
     17         columns dfcnyCd  varchar2(30) path '@dfcnyCd'
     18               , exmCd    varchar2(3)  path '@exmCd'
     19               , createDt date         path '@createDt'
     20       ) (+) x2
     21  ;
    
    EMPSTDT     AUTH                           REGCAT DFCNYCD                        EXMCD CREATEDT
    ----------- ------------------------------ ------ ------------------------------ ----- -----------
    21/08/2000  ABCD                           BM
    21/08/2000  ABCD                           BM     EXAM                           M10   13/01/2012
    21/08/2000  ABCD                           BM     EXAM                           X40   13/01/2012
    21/08/2000  XYZ                            SU     EXAM                           M10   13/01/2012
    21/08/2000  XYZ                            SU     EXAM                           X40   13/01/2012
     
    

    Note: I have tested the above on 11.2.0.2 and it seems that there is a bug, if we add an outer join on the first XMLTable operator too.
    Normally, the first outer join is not necessary, in order to also test on your version without it.

  • Parent to see the table of contents in the project of the child

    Hello

    I will have difficulty to display the table of contents merged into the project of the child.  The application, I work with called via a URL.

    When I open one of the child htm files after generating locally, I see the contents of the Parent table.  But when I move the project to the server via FileZilla and display help via the application, the Parent html files is displayed the table of contents merged, but the child shows only the TOC of the child.

    I have read all the info on the site of Peter Grainge, but can't see what I can change to make it work.

    http://www.Grainge.org/pages/authoring/merging_webhelp/merging_method_original.htm http://www.Grainge.org/pages/Authoring/merging_webhelp/merged_help.htm

    In settings of WebHelp, Show merged TOC in the child project is enabled for the Parent.

    I tried to experiment with the different calls of URL described on the website of Peter, but if I use the suggested format (X:/helpfolder/startpage.htm#mergedprojects/child_project/target_topic_1.htm) I find myself with the two tables of contents showing.

    8-6-2013 2-34-17 PM.jpg

    For any help or suggestion is appreciated!

    Note: Using RoboHelp 9 and generating WebHelp.

    Thank you

    Natalie

    It is a common mistake. Somewhere in your configuration, you claim the home page when you call the default theme. Maybe in your redirection?

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • How to create a table of contents of several levels?

    How to create a table of contents of several levels, or at least a TOC of two levels, so that when you click on the sign '+' or something similar to the first level, the second level will increase?

    Select the item/s from the list Table of contents, and then use the arrows that will apear at the bottom of the skin Editor to move them to the right.  This will cause a new point TOC to appear as a cap for all items indented beneath it.

    Be aware that during the execution by clicking on this article of the topic does not operate the game to slide under him.  There is no that expand the group to show slides of the child. You will then need to click on the first slide of the child in the group to trigger playback.  Personally I don't like the way it works, but that's how it is.  Register a feature (like me) request if you want that it works differently in a future version of Captivate.

  • hitTestObject with several bays

    Hello!

    I made a game and have a few problems

    I want to do a hitTestObject between several bays, I tried something like this:

    for (var i: Number = 0; i < array1.length; i ++)

    {

    array array1 [i] there-= 10; Moves an object to the top

    for (var a: number = 0; i < array2.length; a ++)

    {

    If (array1 [i] .hitTestObject (array2 [i]))

    {

    trace ("hit!");

    }

    }

    }

    When I run it, something which will detect the collision and will display 'hit', but some who will ignore. I also noticed that some opposes in array1 stop running the code for moving (array1 [i] there-= 10) after I added another picture.

    My question is: is at - it a more efficient way to do this? Or at least a way so that everything works fine

    Thanks in advance!

    There is a more correct way to do it... No I have

    If (array1 [i] .hitTestObject ([a] array2))

Maybe you are looking for