Está en la página 1de 2

On timer

gh = System.GetTime(TIME_FMT_HOUR);
gm = System.GetTime(TIME_FMT_MIN);
gs = System.GetTime(TIME_FMT_SEC);

Label.SetText("Label1", gh..":"..gm.."."..gs);

On preolad

Page.StartTimer(1000);

Pues ahora,debajo de ese codigo le a�adimos este otro:

C�DIGO:

igt1 = Input.GetText("Input1");
igt2 = Input.GetText("Input2");
if igt1 == gh and igt2 == gm then
Audio.Play(CHANNEL_BACKGROUND);
end�

on chow

Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\Cool (short).ogg)",false, false);

title = " 1,2,3 - \"Reloj Digital Creado por Juan Rondon -";
Page.StartTimer(151);

on preload
on preloadPage.StartTimer(1000);

on timer

gh = System.GetTime(TIME_FMT_HOUR);
gm = System.GetTime(TIME_FMT_MIN);
gs = System.GetTime(TIME_FMT_SEC);
Label.SetText("Label1", gh..":"..gm.."."..gs);

igt1 = Input.GetText("Input1");
igt2 = Input.GetText("Input2");
if igt1 == gh and igt2 == gm then
Audio.Play(CHANNEL_BACKGROUND);
end

-- set time display


curTime = Math.Round(Audio.GetCurrentPos(CHANNEL_USER1), 2);
if String.Find(curTime, ".", 1, false)==-1 then
curTime = String.Concat(curTime, ".");
end
decPos = String.Find(curTime, ".", 1, false);
strLen = String.Length(curTime);
zerosNeeded = 2 - (strLen - decPos);
if zerosNeeded > 0 then
for count = 1, zerosNeeded do
curTime = curTime.."0";
end
end
Paragraph.SetText("Paragraph1", curTime);

-- set "now playing" display


myChar = String.Left(title, 1);
title = String.Right(title, (String.Length(title)-1));
title = title..myChar;
titleText = String.Left(title, 20);
Paragraph.SetText("Paragraph2", titleText);

También podría gustarte