I have a group of multiple objects.
If I select one object from the group, then i use the method: click=”makeObj(event)”
And then the function:
protected function makeObj(event:MouseEvent):void
{
var targetObj:Object = event.currentTarget;
}
But how to use all the other objects in the group except clicked (target)?
put all your objects in an array and define a clicked property for each object
protected function makeObj(event:MouseEvent):void { //in case you want to deselect all the other objects when one //object is clicked for each( var obj:Object in myObjects ) obj.clicked = false; var targetObj:Object = event.currentTarget; targetObj.clicked = true; myObjectsAction(); } protected function myObjectsAction():void { for each( var obj:Object in myObjects ) if( !obj.clicked ) doWhatever( obj ); }