Fixed. Sort of.
The problem is that you're creating it on script load. At that point, the window doesn't exist yet. You need to create it when the main window has loaded. Not sure off the top of my head how to do this (but i'll go ahead and look). I hacked up a quick fix just to make sure things were OK.
See attached for image
The problem is that you're creating it on script load. At that point, the window doesn't exist yet. You need to create it when the main window has loaded. Not sure off the top of my head how to do this (but i'll go ahead and look). I hacked up a quick fix just to make sure things were OK.
I set the timer kinda high just to be sure, so it'll take 5 seconds before you notice it.code:
#include <lib/std.mi>
Global Timer callback;
System.onScriptLoaded()
{
callback = new Timer; callback.setDelay(500); callback.start();
}
callback.onTimer() {
callback.stop();
component avs = getScriptGroup().findObject("avs");
region r = new region;
r.loadFromBitmap("avs.map");
avs.setRegion(r);
}
See attached for image
Comment