hashMap.eachValue的使用风险

public function getAreaValue():Number
		{
			
			var value	:Number							=	0	;
			var obj		:Object								=	new Object();
			obj.value											=	0;
			obj.buildingValue	=	function( park:AbstractPark ):void
			{
				
				obj.value	+=	park.industryData.areaValue ;
			}
				
			
				
			/*function buildingValue( park:AbstractPark ):void
			{
				trace( this );
				value+=park.industryData.areaValue ;
			}*/
			_parkHashmap.eachValue( obj.buildingValue ) ;
			Debug.trace( "getAreaValue"+obj.value) ;
			return value ;
		}

posted on 2013-03-26 19:30  AS3.0  阅读(156)  评论(0编辑  收藏  举报

导航