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

						{
							var sID = node.ARGUMENT[1].@VALUE;
							var id = node.ARGUMENT[2].@VALUE;
							var x = Number(node.ARGUMENT[3].@VALUE) * stagewidth;
							var y = Number(node.ARGUMENT[4].@VALUE) * stageheight;
							var a = Number(node.ARGUMENT[5].@VALUE);
							var X = Number(node.ARGUMENT[6].@VALUE);
							var Y = Number(node.ARGUMENT[7].@VALUE);

						if(type == "set")
						{
							var id = node.ARGUMENT[1].@VALUE;
							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;
