ฟอนต์ฟอรั่ม

F0NT Community (เก่า) => ห้องคอม => ห้องแฟลช => โพสต์ถูกเริ่มโดย: iNokjung เมื่อ 27 พ.ย. 2011, 02:48 น.

ชื่อเรื่อง: ทำวัตถุให้ลงมาทีละชิ้นโดยเวลาต่าง
โพสต์โดย: iNokjung เมื่อ 27 พ.ย. 2011, 02:48 น.
เอาโค้ดนี้ไปใส่ทุกวัตถุที่หล่นลงมามันเลยหล่นมาพร้อมกัน อยากให้มันค่อยๆ หล่นลงมาทีละชิ้นทำไงดีค่ะ
onClipEvent(enterFrame)

{
      this._rotation += 5;                               
      this._y += 9;
   
      if(this._y > Stage.height)
      {
      this._y =- 5;
      this._x =random(Stage.width);
      }
      if (this.hitTest(_root.bin1))
   {
      
      _root.score++;
      unloadMovie (this);

   }
}