Hi Kurt, What you are doing, I think, is putting the x&y of map to where springfield is. If you want to center springfield on the stage then I think you need to:
var centerPointX = Stage.width/2; var centerPointY = Stage.height/2; map.tween("_y",map._y + (centerPointY - point.y),.6,'easeOutSine'); map.tween("_x",map._x + (centerPointX - point.x),.6,'easeOutSine'); -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Dommermuth Sent: 07 October 2005 14:33 To: flashcoders@chattyfig.figleaf.com Subject: Re: Fwd: RE: [Flashcoders] localToGlobal ? Hi Giles, thank you for responding. this is exactly what i'm doing but my "MAP" just shoots right off the stage. selectCommunity = function(communityName) { var point:Object = {x:map[communityName]._x, y:map[communityName]._y}; map[communityName].localToGlobal(point); map.tween("_y",point.y,.6,'easeOutSine'); map.tween("_x",point.x,.6,'easeOutSine'); trace("point.y = " + point.y + " point.x = " + point.x); } trace reveals point.y = 255.9 point.x = 768.9 then next time the function is called: point.y = 779.7 point.x = 1436.8 so ive got two issues. the map doesn't center on "springfield" and the x and y value increase with every call. I though var made it private. this is not the case with objects? totally missing the boat. nwebb, thank you for the link. I haven't tried the function there, but I will. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders