There's none. In fact, for the PC version, you click on the item in your inventory and the item is following your cursor. If you click on an empty space, the item disappear. For a touch version it's not as simple as there is not a cursor. So you drag the item with your finger,but if you stop touching the screen (in order to think where to put the item for exemple), and then touch again the screen, the item disappear. So I'm trying to change that by making a double tap method. The player have to double tap on the screen for making the item disappear. The original code (for the PC version) is : public function DraggedItem(stageRef:Stage, grabbedItem:Object){ .... stageRef.addEventListener(MouseEvent.MOUSE_MOVE, dragItem, false, 0, true); stageRef.addEventListener(Event.ENTER_FRAME, itemHitTest, false, 0, true); draggedItem.addEventListener(MouseEvent.MOUSE_DOWN, itemClick, false, 0, true); } public function itemClick(e:Event):void{ if (newFriend){ nameofMC = "action_"+draggedName+"_"+newFriend.displayName; //trace ("Looking for "+nameofMC); ....blabla ..... ..... } } else { removeDraggedItem(); } private function removeDraggedItem():void{ stageRef.removeEventListener(MouseEvent.MOUSE_MOVE, dragItem); stageRef.removeEventListener(Event.ENTER_FRAME, itemHitTest); draggedItem.removeEventListener(MouseEvent.MOUSE_DOWN, itemClick); stageRef.removeChild(draggedItem); toolbar.useText.text = ""; if (stageRef.contains(this)) stageRef.removeChild(this); Mouse.show(); Engine.playerControl = true; }
... View more