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