0

条件の 1 つは、1 つのオブジェクトを特定の位置に配置すると、次のステップが表示されるドラッグ アンド ドロップ ゲームを作成しようとしています。

私はコーディングに非常に慣れておらず、ほとんどの場合、ほとんど盲目的に飛んでいます。このコードを作成しましたが、ゲームを正しく機能させるために正しく書いているかどうかわかりません

  gamefacetemplate.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag_2);

function fl_ClickToDrag_2(event:MouseEvent):void
{
    gamefacetemplate.startDrag();
}

gamefacetemplate.addEventListener(MouseEvent.MOUSE_MOVE, fl_ObjectPosition);

function fl_ObjectPosition(event:MouseEvent):void
{
    gamefacetemplate.x = 706.90;
    gamefacetemplate.y = 311.90;
}

gamefacetemplate.addEventListener(MouseEvent.CLICK, fl_MoveToHide_6);

function fl_MoveToHide_6(event:MouseEvent):void
{
    instrustep2.visible = false;
}

stage.addEventListener(MouseEvent.CLICK, fl_ReleaseToDrop);

function fl_ReleaseToDrop(event:MouseEvent):void
{
    gamefacetemplate.stopDrag();
}

{
gamefacetemplate.visible = false;
}

{
    gotoAndStop(5);
}

ありとあらゆる助けをいただければ幸いです。

4

1 に答える 1