function onSample() { var rootBox = scene.rootBox; if (rootBox) { var styleVar = rootBox.getStyle("margin"); if (styleVar && !styleVar.isNull) { var rectValue = styleVar.rectValue; if (rectValue) { var left = rectValue.left; if (left && !left.isNull) { shell.print("left = " + left.intValue); } } } } }