Adobe Flash 2.0 Inventory

0

I'm trying to do some sort of inventory in Flash in AS 2.0. But as much as I try the objects either do not go to the site or do not intersperse with each other. I used the Scripts:

george = 0;
manuel = 0
function onEnterFrame() {
    if(key.hitTest(mov)){
        trace ("test");
        if(george = 0){
    key._x = _root.inv1._x;
    key._y = _root.inv1._y;
    george = 1;

}       if(manuel = 0){
    key._x = _root.inv2._x;
    key._y = _root.inv2._y;
    manuel = 1;

}
}

if(key2.hitTest(mov)){
        trace ("test");
if(george = 0){
    key2._x = _root.inv1._x;
    key2._y = _root.inv1._y;
    george = 1;}
    if(manuel = 0){
    key2._x = _root.inv2._x;
    key2._y = _root.inv2._y;
    manuel = 1;

}
}

}

E:

var iv1 = 0
var iv2 = 1
var iv3 = 2
var iv4 = 3

function onEnterFrame() {
if(key.hitTest(mov)){
        trace ("test");

        if (iv1 == 0){

        key._x = _root.inv1._x;
        key._y = _root.inv1._y;
        }

        if (iv2 == 2){

        key._x = _root.inv2._x;
        key._y = _root.inv2._y;
        }
        if (iv3 == 4){

        key._x = _root.inv3._x;
        key._y = _root.inv3._y;
        }
        if (iv1 == 4){

        key._x = _root.inv4._x;
        key._y = _root.inv4._y;
        }
}
if(key2.hitTest(mov)){
        trace ("test");

        if (iv1 == 0){

        key2._x = _root.inv1._x;
        key2._y = _root.inv1._y;
        }

        if (iv2 == 2){

        key2._x = _root.inv2._x;
        key2._y = _root.inv2._y;
        }
        if (iv3 == 4){

        key2._x = _root.inv3._x;
        key2._y = _root.inv3._y;
        }
        if (iv1 == 5){

        key2._x = _root.inv4._x;
        key2._y = _root.inv4._y;
        }

}
if(key.hitTest(inv1)){
    iv1 += 1;
    if (iv1  > 1)
    {
        iv1 -=1
    }
}
if(key2.hitTest(inv1)){
    iv1 += 1;
    if (iv1  > 1)
    {
        iv1 -=1
    }
}
    if(key.hitTest(inv2)){
    iv2 += 1;
    if (iv2  > 1)
    {
        iv2 -=1
    }
    if(key2.hitTest(inv2)){
    iv2 += 1;
    if (iv2  > 1)
    {
        iv2 -=1
    }
    }
}

None of these works correctly.

    
asked by anonymous 21.06.2018 / 22:36

0 answers