# Scale all but currentTarget

**URL:** <https://forum.kirupa.com/t/scale-all-but-currenttarget/326086>\
**Category:** flash\
**Created:** [November 22, 2011, 10:02am UTC](https://forum.kirupa.com/t/scale-all-but-currenttarget/326086 "2011-11-22T10:02:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obi\_Wan](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@Obi\_Wan](https://forum.kirupa.com/u/Obi_Wan)\
**Post date:** [November 22, 2011, 10:02am UTC](https://forum.kirupa.com/t/scale-all-but-currenttarget/326086/1 "2011-11-22T10:02:59Z")

</div>

Hey folks on click I am trying to scale the currentTarget to 1 and loop through all of my other items and scale them down to .6 if they are not the currentTarget.

Please view the two functions below. The initEaselItems sets up my movieclips and adds the eventlistener and where I am having the problem is in easelItemHandler in the first condition. I would appreciate any help.

```auto

		private function initEaselItems():void
		{
			var easelItemURL :String;
			var totalEaselItems :Number = _xmlsource.easelAssets.alphabet.length();
			
			for(var i:int=0; i<totalEaselItems; i++)
			{
				easelItemURL = _xmlsource.easelAssets.alphabet.@imageURL*;
				_easelItemClip = new MovieClip();
				_easelItemClip.name = "easelItemClip";
				_easelItemClip.index	= *;
				_easelItemClip.x = _xmlsource.easelAssets.alphabet.@xPos*;
				_easelItemClip.y = _xmlsource.easelAssets.alphabet.@yPos*;
				_easelItemClip.alpha	= 0;
				_easelItemClip.scaleX	= 1;
				_easelItemClip.scaleY	= 1;
				_easelItem = new ImageLoader(easelItemURL, {estimatedBytes:2400,container:_easelItemClip, x:0, y:0});
				
				_easel.alphabetContainer.addChild(_easelItemClip);
				_easelItem.load();
				_easelItemClip.buttonMode = true;
				_easelItemClip.mouseChildren = false;
				_easelItemClip.addEventListener(MouseEvent.CLICK,easelItemHandler,false,0,true);
				TweenLite.to(_easelItemClip, .5, {alpha:1, scaleX:.6, scaleY:.6, delay:(i*.025)});
			}
		}
		
		
		private function easelItemHandler(event:MouseEvent):void
		{
			var totalEaselItems	:Number = _xmlsource.easelAssets.alphabet.length();
				for (var i:int = 0; i<=totalEaselItems; i++) {
					if (!event.currentTarget) {
						TweenLite.to(_easel.alphabetContainer["easelItemClip"+i], .5, {transformAroundCenter:{scaleX:.6, scaleY:.6}});
					}
					else {
						TweenLite.to(event.currentTarget, .5, {transformAroundCenter:{scaleX:1, scaleY:1}});
					}
				}
		}

```
