All pastes #639149 Raw Edit

Unbenannt

public text v1 · immutable
#639149 ·published 2007-07-30 11:28 UTC
rendered paste body
				//var contentLocal:Point = new Point( content.x, content.y );
				var global:Point = content.localToGlobal( event.stageX, event.stageY );
				var local:Point  = main.room.globalToLocal( global );
				
				if( local.x > main.room.width - 50 )
				{
					bitmap.rotation = -90;
					content.x = main.room.width - content.width - 0.1;
				}
				else if( local.x < 50 )
				{
					bitmap.rotation = 90;
					content.x = content.width;
				}
				
				if( local.y > main.room.height - 50 )
				{
					bitmap.rotation = 0;
					content.y = main.room.height - content.height - 0.1;					
				}
				else if( local.y < 50 )
				{
					bitmap.rotation = 180;
					content.y = content.height;					
				}