Add background image to library
Create a style for page with the image as background
Create a style for the text col-red using Ascii32 font
curRel=CC
Create a variable for action
Create and load timer that runs for 400ms forever.
Create an intreupt on the Timer that runs flashF function.
Define a page named "pageName" with style "pageStyle"
Position the text entity at 240,136
Create flashF function
Check status of varAction variable
if variable = 0 Hide text
if variable = 1 change style col and then show text
if variable = 2 Hide text
if variable = 3 change style col and then show text
if variable = 4 Hide text
if variable = 5 change style col and show text, reset
variable to 0
if variable does not = 5 then increment varAction
After loading show the page named "pageName"
|
LIB(background,"SDHC/bground.png");
STYLE(pageStyle, Page){image=background;}
STYLE(textStyle, Text){font=Ascii32;col=Red;curRel=CC;}
VAR(varAction,0,U8);
LOAD(TIMER0,400,0);
INT(intName,TIMER0,flashF);
PAGE(pageName, pageStyle)
{
POSN(240, 136);
TEXT(Text1,"FLASHING TEXT MESSAGE",textStyle);
}
FUNC(flashF)
{
IF(varAction=0?[HIDE(Text1);;]);
IF(varAction=1?[LOAD(textStyle.col,indigo);SHOW(Text1);;]);
IF(varAction=2?[HIDE(Text1);;]);
IF(varAction=3?[LOAD(textStyle.col,Blue);SHOW(Text1);;]);
IF(varAction=4?[HIDE(Text1);;]);
IF(varAction=5?[LOAD(textStyle.col,Red);SHOW(Text1);; LOAD(varAction,0);]:[CALC(varAction,varAction,1,"+");]);
}
SHOW(pageName);
|