You can do so like this:
PHP Code:
//#CLIENTSIDE
function onCreated() {
drawBlock();
}
function GraalControl.onResize() {
drawBlock();
}
function drawBlock() {
with (findimg(200)) {
image = "block.png";
width = 32; // I set the width statically, since getimgwidth(image)
// will return 0 if the image isn't downloaded yet.
x = screenwidth - width - 16;
y = 16;
layer = 4;
}
}