Skip to content

Instantly share code, notes, and snippets.

@takumus

takumus/point.as Secret

Created December 19, 2016 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takumus/952b67814095df83a322b3b9d0ae6136 to your computer and use it in GitHub Desktop.
Save takumus/952b67814095df83a322b3b9d0ae6136 to your computer and use it in GitHub Desktop.
//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