# What influences x and y coords display?

**URL:** <https://forum.kirupa.com/t/what-influences-x-and-y-coords-display/209534>\
**Category:** Uncategorized\
**Created:** [December 9, 2006, 10:44pm UTC](https://forum.kirupa.com/t/what-influences-x-and-y-coords-display/209534 "2006-12-09T22:44:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Binji](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Binji](https://forum.kirupa.com/u/Binji)\
**Post date:** [December 9, 2006, 10:44pm UTC](https://forum.kirupa.com/t/what-influences-x-and-y-coords-display/209534/1 "2006-12-09T22:44:11Z")

</div>

I have a function which attaches a bunch of MCs onto another MC and then calls a function which also attaches a bunch of MCs onto another MC. The problem is as soon as i call both functions the second function puts the MCs into lower right corner. I checked the coords and theyre OK.  
When i disable the first function the second works fine. I tried putting the second in front of the first but the result is the same. Also if i disable the second one the first one works fine.  
I have no idea what could be wrong and i would be really glad if someone could help me out!

Here are the functions:

```auto

        var i:Number;
        var j:Number;

        for (i = 0; i<stKaset; i++) {
            for (j = 0; j<stKasetVer; j++) {
                kx=i*43+(i+1)*presledekHor;
                ky=j*29+(j+1)*presledekVer;                
                
                k = ref.attachMovie("kaseta", "kaseta"+i+""+j, ref.getNextHighestDepth());
                k._x = kx; 
                k._y = ky; 
            }
        }
        ref._x = zac_X;
        ref._y = zac_Y;

       izrisiLinije(lamelaGladka); //this is the second function

```

```auto

function izrisiLinije(presledek:Number){
    var stLinij = zaokrozi(visinaPr/presledek);
    var ref = this.vzorec_vrat;
    var i=0;
    var koo_y = zac_Y;
        
    for(i=0;i<stLinij;i++){
        koo_y +=presledek;
            
        var l = ref.attachMovie("locilo", "linija"+i, ref.getNextHighestDepth());
        l._x = zac_X+2;
        l._y = koo_y;
        l._width = sirinaPr-2;
    }//for zanka
};

```
