Create a gist now

Instantly share code, notes, and snippets.

@takumus /point.as Secret
Created Dec 19, 2016

What would you like to do?
//mousedown
body.addEventListener(ListCellMouseEvent.MOUSE_DOWN, function(e:ListCellMouseEvent):void
{
if(body.mouseX > cellWidth - 70){
//if mousedown on right of cell, begin sort.
beginSort();
}
});
//click
body.addEventListener(ListCellMouseEvent.CLICK, function(e:ListCellMouseEvent):void
{
if(body.mouseX < 70){
//if click on left of cell, remove this cell.
remove();
}else if(body.mouseX < cellWidth - 70){
//if click on center of cell, message.
message("Hi. My data is [" + data.data + "]");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment