Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Drag, Drop and Snap Inventory System

My latest AS3 Game Inventory System.

Features

  • Drag, drop and snap
  • Create/destroy inventory containers
  • Create/destroy level containers
  • Move items between different movieclip containers
  • Create/destroy items in level
  • Create/destory items in inventory – new
  • Find empty inventory slot – new
  • Added item selected/diselected state – new
  • Added slot full/empty state – new
  • Code optimization and more comments – new

Preview – v1.1.2

Download Fla Sample

Download Fla Sample


Wishlist

  • Stackable Items – items of the same type can be placed in the same slot
  • Auto-pickup item – items placed in bag automatically, if bag has space
  • Multiple Level containers – different game levels
  • Multiple Inventory containers – bag, bank, store
  • Destroy items
  • Sell items
  • Show Item Tooltips

Bug Fixes
v1.1.2

  • Fixed bug when releasing mouse over item, while holding nothing – Thanks 19greg96!

v1.1.1

  • Fixed “slot full” bug after removing item from slot – Thanks 19greg96!
  • Fixed publishing issue for Flash Player 10

AS2
Older AS2 version is available here:
http://www.freeactionscript.com/2008/11/drag-drop-snap-inventory-system-v2/

 

 

Drag Drop & Snap Inventory System v2

Drag, drop and snap inventory system for Flash games written in ActionScript 2.0.

I updated the previous version of my drag drop and snap inventory system to make it easier to understand. Added the ability to create new dragable items as objects. Also cleaned up & commented all the code.

Features

  • Slots Array
  • Create new Draggable Items
  • Drag & Drop Items
  • Dropped Items snap to Slot
  • Each Item stores Slot info
  • Each Slot stores Item info
  • Return to previous position if current slot is full

Drag, Drop & Snap Inventory System Sample v2

Download Fla Sample

Download Fla Sample

Update:
AS3 version of my inventory system is available here:

http://www.freeactionscript.com/2010/11/drag-drop-and-snap-inventory-system/

Drag Drop & Snap Inventory System

Update 11/03/08
Please see http://www.freeactionscript.com/2008/11/drag-drop-snap-inventory-system-v2/ for the latest version of the Drag Drop and Snap Inventory system.

Here is a prototype of my ActionScript 2.0 drag, drop and snap inventory system for flash games.

Drag, Drop & Snap Inventory System Sample

Download Fla Sample

Download Fla Sample