Adobe AIR 3.2 Glitch

2019-09-02 01:47发布

问题:

I just finished a successful build of my program last night. Then, I get up this morning, and after an update fro Adobe AIR 3.1 to AIR 3.2, I find THIS bug!

The same build under 3.1 works perfectly. However, as soon as 3.2 is installed, the following code after stopDrag fails silently. Mind you, it only fails in the packed and installed AIR application. It works perfectly when I test it inside of Adobe Flash Professional CS5.5

WHAT is going on? Here's the code I'm dealing with. Again, this works without error for Adobe AIR 3.1, but fails for 3.2. I cannot get to any other MouseEvent.MOUSE_UP events in my program at this point, due to my structure.

I omitted the irrelevant parts of the code. All the same, there is a lot, due to the fact that I don't know where the error occurs exactly. Instead of everything that is supposed to happen happening, stopDrag is the last line of code that fires in this block.

tile5.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler5);

function mouseUpHandler5(evt:MouseEvent):void
{
    Mouse.cursor = "paw";
    var obj = evt.target;
    var target = obj.dropTarget;
    obj.stopDrag();
    if (target != null && target.parent == hsSlot1)
    {
        brdgcheck(5, 1);
    }
}

function brdgcheck(tile:int, slot:int)
{
    var ck_brdg_l:String = "osr.Langue.brdg_l" + String(slot);
    var ck_brdg_t:String = "osr.Langue.brdg_t" + String(tile);
    var ck_slotfilled:String = "Slot" + String(slot) + "Filled";
    var ck_tile:String = "tile" + String(tile);
    var ck_slot:String = "hsSlot" + String(slot);
    var ck_txtTile:String;

    switch(tile)
    {
        case 1:
            ck_brdg_t = osr.Langue.brdg_t1;
            ck_txtTile = tile1.txtTile1.text;
        break;
        case 2:
            ck_brdg_t = osr.Langue.brdg_t2;
            ck_txtTile = tile2.txtTile2.text;
        break;
        case 3:
            ck_brdg_t = osr.Langue.brdg_t3;
            ck_txtTile = tile3.txtTile3.text;
        break;
        case 4:
            ck_brdg_t = osr.Langue.brdg_t4;
            ck_txtTile = tile4.txtTile4.text;
        break;
        case 5:
            ck_brdg_t = osr.Langue.brdg_t5;
            ck_txtTile = tile5.txtTile5.text;
        break;
    }

    switch(slot)
    {
        case 1:
            ck_brdg_l = osr.Langue.brdg_l1;
        break;
        case 2:
            ck_brdg_l = osr.Langue.brdg_l2;
        break;
        case 3:
            ck_brdg_l = osr.Langue.brdg_l3;
        break;
        case 4:
            ck_brdg_l = osr.Langue.brdg_l4;
        break;
        case 5:
            ck_brdg_l = osr.Langue.brdg_l5;
        break;
    }

    if (ck_brdg_l == ck_brdg_t)
    {
        osr.Sonus.PlaySound("concretehit");
        this[ck_slotfilled].visible = true;
        switch(slot)
        {
            case 1:
                Slot1Filled.txtSlot1.text = ck_txtTile;
            break;
            case 2:
                Slot2Filled.txtSlot2.text = ck_txtTile;
            break;
            case 3:
                Slot3Filled.txtSlot3.text = ck_txtTile;
            break;
            case 4:
                Slot4Filled.txtSlot4.text = ck_txtTile;
            break;
            case 5:
                Slot5Filled.txtSlot5.text = ck_txtTile;
            break;
        }

        this[ck_tile].visible = false;
        this[ck_slot].visible = false;
        if (hsSlot1.visible == false && hsSlot2.visible == false && hsSlot3.visible == false && hsSlot4.visible == false && hsSlot5.visible == false)
        {
            osr.Gradua.Score(true);
            osr.Gradua.Evaluate("brdg");
            btnReset.visible = false;
            hsChar.visible = false;
            if (osr.Gradua.Fetch("brdg", "arr_act_stcnt") < 4)
            {
                bga.gotoAndPlay("FINKEY");
                win_key();
            }
            else
            {
                bga.gotoAndPlay("FINNON");
            }
        }
        else
        {
            osr.Gradua.Score(true);
        }
    }
    else
    {
        osr.Gradua.Score(false);

        osr.Sonus.PlaySound("glassbreak");
        switch(tile)
        {
            case 1:
                tile1.x = 92.85;
                tile1.y = 65.85;
            break;
            case 2:
                tile2.x = 208.80;
                tile2.y = 162.85;
            break;
            case 3:
                tile3.x = 324.80;
                tile3.y = 65.85;
            break;
            case 4:
                tile4.x = 437.80;
                tile4.y = 162.85;
            break;
            case 5:
                tile5.x = 549.80;
                tile5.y = 65.85;
            break;
        }
    }
}

EDIT: I found a good workaround, to use "if (hsSlot1.hitTestPoint(mouseX,mouseY) && hsSlot1.visible == true)" However, a solution to this problem would still be appreciated!