Sounds perfect! Thanks
On Apr 9, 3:56 pm, savagelook <[email protected]> wrote: > you could create a variable that identifies the currently selected > object and in your mouseup function make sure only the selected object > performs any actions: > > var selectedId:int = -1; > > private function onMouseDown(evt:MouseEvent3D):void { > selectedId = evt.target.id; > // do the rest of your mouse down code > > } > > private function onMouseUp(evt:MouseEvent3D):void { > if (evt.target.id == selectedId) { > // do mouse up code > } > > } > > You will probably want to add aneventlistener to the background so > that if youclickno objects it sets the selectedId back to -1. > > On Apr 9, 8:21 am, Konstantinos Anatolitis > > <[email protected]> wrote: > > Hi there, > > > I've got an away3D application where you drag and drop items in a 3D > > room and then you canclickon them and things happen. > > I've used item.addOnMouseUp and it works just fine, but I have a small > > issue with that. > > > When there are already some items in the room and I drag a new one, my > > mouseUp listener gets triggered if mouse is over an item which is > > already there. So, that's why I need an addOnMouseClick listener, > > which will be triggered only if down and up mouse states have happened > > to the same 3d object. > > > Thanks for your time. > > > Kostas -- To unsubscribe, reply using "remove me" as the subject.
