 						if(type == "set")
 						{
 							var id = node.ARGUMENT[1].@VALUE;
-							var x = Number(node.ARGUMENT[2].@VALUE) * stagewidth;
-							var y = Number(node.ARGUMENT[3].@VALUE) * stageheight;
+							var x = Number(node.ARGUMENT[2].@VALUE) * thestage.stage.stageWidth;
+							var y = Number(node.ARGUMENT[3].@VALUE) *  thestage.stage.stageHeight;
 							var X = Number(node.ARGUMENT[4].@VALUE);
 							var Y = Number(node.ARGUMENT[5].@VALUE);
 							var m = node.ARGUMENT[6].@VALUE;

		static var FLOSCSocket:XMLSocket;		
		static var FLOSCSocketHost:String;			
		static var FLOSCSocketPort:Number;	
		static var thestage:Sprite;
		static var objectArray:Array;
		static var idArray:Array;
		

					if(debugMode)
					{
						debugText.appendText("  " + (i + 1) +" - " +objectArray[i].ID + "  X:" + int(objectArray[i].x) + "  Y:" + int(objectArray[i].y) + "  \n");
						debugText.x = thestage.stage.stageWidth-160;
						debugText.y = 40;		
					}
					}
