//変数に,各クラスのインスタンスを作成して代入 var plate1:Plate = new Plate(); var croissant1:Croissant = new Croissant(); var potatoSalad1:PotatoSalad = new PotatoSalad(); //お皿をステージに表示し,位置を調整 this.addChild(plate1); plate1.x = 100; plate1.y = 150; //クロワッサンをお皿の上に表示し,位置を調整 plate1.addChild(croissant1); croissant1.x = -55; croissant1.y = -50; //ポテトサラダをお皿の上に表示し,位置を調整 plate1.addChild(potatoSalad1); potatoSalad1.x = -25; potatoSalad1.y = -25; //お皿の位置を移動すると,二つの料理のインスタンスも移動する plate1.x = 160; plate1.y = 100; //これで消す this.removeChild(plate1);