Chapter 7: Flash Application Layout
47
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
if (box.y0 < 0)
deltaY = sabs(deltaY);
if (box.y1 > height)
deltaY = -sabs(deltaY);
WinFill(&w, &box, A_REVERSE);
WinRect(&w, &box, A_NORMAL);
box.x0 += deltaX;
box.x1 += deltaX;
box.y0 += deltaY;
box.y1 += deltaY;
boxcount -= 1;
break;
case CM_ACTIVATE:
DrawWinBorder(&w, &w.Window);
EV_defaultHandler(event);
break;
case CM_WPAINT:
WinBackupToScr(&w);
break;
default:
EV_defaultHandler(event);
break;
}
}
static short sabs(short n)
{
return n < 0 ? -n : n;
}
static short random(short low, short high)
{
short range;
static long seed = 29;
if (seed == 0)
seed = 1;
seed *= 16807;
if (seed < 0)
seed = -seed;