Fair enough, about the ownership thing. It didn't seem to matter much to me for little preview pics.
var map_image;var w = GetScreenWidth();var h = GetScreenHeight();var black = CreateColor(0,0,0);var x = 0;var y = -h;function sliding_map(){ map_image = GrabImage(0, 0, w, h); Rectangle(0, 0, w, h, black); map_image.blit(x, y); ++y; if(y ==0) { SetRenderScript(""); }}SetRenderScript(sliding_map);
Code: [Select]var map_image;var w = GetScreenWidth();var h = GetScreenHeight();var black = CreateColor(0,0,0);var x = 0;var y = -h;function sliding_map(){ map_image = GrabImage(0, 0, w, h); Rectangle(0, 0, w, h, black); map_image.blit(x, y); ++y; if(y ==0) { SetRenderScript(""); }}SetRenderScript(sliding_map);Looking back it I'm nervous about variable scoping - the RenderScript probably gets called in a different context to wherever it's set up so you may have to make all of the variables it uses global, then just reset the y coordinate and set the script when you're ready for it.