Show all
Featured downloads:
dd_tile_list-v7.zip dd_tile_list_example-v7.zip dd_tile_list_example_2-v7.zip
dd_tile_list-v7.zip dd_tile_list_example-v7.zip dd_tile_list_example_2-v7.zip
Description
The dd_tile_list class extends the as3 TileList component to add drag and drop functionality. Dropping between components is supported. This class aims to be CellRenderer and Style agnostic.
Example
- Basic: http://jeremyrodgers.com/dd_tile_list/index.html
- Video: http://jeremyrodgers.com/dd_tile_list/example2.html
if you have something you want to show send a url to: jeremymrodgers@gmail.com I'd like to see what, if anything, is being done with this project. Please indicate in the message if I can post the link here.
Properties
There are several options to configure the behaviour:
- Inspectable Public Properties
- canDragFrom (t/f)
- dragRemovesItem (t/f)
- dropOffRemovesItem (t/f)
- canDropOn (t/f)
- dragAlpha (0:1)
- autoScroll (t/f) (autoScroll works in both horizontal and vertical TileList directions.)
- scrollZone (0:1)
- scrollSpeed (1:10)
- allowDuplicates (t/f)
- Uninspectable Public Properties
- compareFunction (function)
Events
- ITEM_ADDED
- ITEM_REMOVED
- DUPLICATE_DENIED
- LIST_REORDERED
- ITEM_DROPPED (new in v.7)
- ITEM_DROPPED_INSIDE (new in v.7)
- ITEM_DROPPED_INSIDE_SELF (new in v.7)
- ITEM_DROPPED_INSIDE_OTHER (new in v.7)
- ITEM_DROPPED_OUTSIDE (new in v.7)
Methods
- halt() - removes listeners, stops timer and removes drag_item.
Not implemented
- multiple selections.
- grouping of components. (this should be possible in v.7 although no example exists).
Notes
- the drag item is placed on the stage DisplayObjectContainer.
- the ITEM_ADDED and ITEM_REMOVED events are not fired when re-ordering within a dd_tile_list instance, instead a LIST_REORDERED event occurs.
- I haven't built the component yet so this needs to be instantiated in code or you can change the linkage of TileList in the library.
News
- Version 7 released. Nov.11.2009 (contributed by Frank McGuire, thanks Frank!)
- Possible to use 'wrapper' classes with 'dd_tile_list' as a base class to restrict drag-drop interaction between groups of TileLists.
- Made the positioning 'arrow' work with vertical TileLists. (arrowRotation)
- Made selected TileLists accept a list of alternate drop target objects.
- Made individual TileList ImageCells accept a list of alternate drop target objects.
- Added events:
- ITEM_DROPPED
- ITEM_DROPPED_INSIDE
- ITEM_DROPPED_INSIDE_SELF
- ITEM_DROPPED_INSIDE_OTHER
- ITEM_DROPPED_OUTSIDE
- Added properties:
- arrowRotation
- arrowVisibility
- arrowPosition
- alt_drop_targets
- Added methods:
- addDropTarget
- General Notes: The MC in each RenderCell or ImageCell may also have an 'alt_drop_targets' list and a 'class_name' var to make the alternate drop target specific to the RC or IC Alternate drop targets can be handled by ITEM_DROPPED_OUTSIDE listener classes.
- Version 6 released.
- Added halt() function - clean up listeners, timer and remove drag_item.
- Changed some internals:
- _ic.data.listData is now just _ic.listData
- _ic.data.index is now just _ic.listData.index
- this makes more sense and fixes a bug I had with a custom CellRenderer.
- _drag_item.data is now populated on start of drag.
- LIST_REORDERED fires when reordering within a dd_tile_list
- Version 5 released.
- Added code contributed by Mathias Wedeken to report ITEM_ADDED and ITEM_REMOVED events.
- These events are not fired when re-ordering within a dd_tile_list instance.
- Added the example.xml file back to the Example download - sorry 'bout that, thanks for pointing it out Mathias.
- Version 4 released.
- New method to determine TileList and CellRenderer under mouse, fixes a problem with as2 swf files in TileList.
- Should be compatible with previous versions.
- emBRACE-ing new code formatting.
- Version 3 released.
- Added compare function override.
- Version 2 released.
- Fixed a bug which used the source scrollSpeed setting instead of the target scrollSpeed setting.
- Added a feature to determine if drop should add to the left or right side of the dropTarget.
- Added a feature which scrolls the target dd_tile_list to always show the newly added item.