Add background image to library
Create a style for page with the image as background
Create a style for the text col-black using Ascii16 font
curRel=RT
Create a text variable called TxtMsg
Create a text variable called TxtMsg2
Create U16 variable for XPos
Create U16 variable for YPos
Create U8 variable for Scroll direction
Define a page named "pageName" with style "pageStyle"
Create text entity to show TxtMsg var
Create text entity to show TxtMsg2 var
Create page loop
Check status of ScrllV if 0 then take 5 from XPos and
YPos and then position the Text entities in new
positions
If XPos =200 set ScrllV to 1
Check status of ScrllV if 1 then add 5 to XPos and YPos
and then position the Text entities in new positions
If XPos =450 set ScrllV to 0
Refresh page after 50ms
After loading show the page named "pageName"
|
LIB(background,"SDHC/bground.png");
STYLE(pageStyle, Page) { image = background; }
STYLE(textStyle, Text) { font=Ascii16; col=Black; curRel=RT; }
VAR(TxtMsg,"Scrolling Text Message",TXT);
VAR(TxtMsg2,"Text Message",TXT);
VAR(XPos,450,U16);
VAR(YPos,0,U16);
VAR(ScrllV,0,U8);
PAGE(pageName, pageStyle)
{
POSN(XPos,134);
TEXT(Text1,TxtMsg,textStyle);
POSN(450, YPos);
TEXT(Text2,TxtMsg2,textStyle);
LOOP(Loop1,FOREVER)
{
IF(ScrllV=0?[CALC(XPos,XPos,5,"-");POSN(XPos,134,Text1); CALC(YPos,YPos,5,"+");POSN(450,YPos,Text2);]);
IF(XPos=200?[LOAD(ScrllV,1);]);
IF(ScrllV=1?[CALC(XPos,XPos,5,"+");POSN(XPos,134,Text1); CALC(YPos,YPos,5,"-");POSN(450,YPos,Text2);]);
IF(XPos=450?[LOAD(ScrllV,0);]);
WAIT(50);;
}
}
SHOW(pageName);
|