AW: newbie video player questions
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Fri Jun 8 08:51:01 EDT 2007
Hi Eddie,
Le 8 juin 07 à 14:19, eddie d a écrit :
> so now I need to figure out how to let it go to a certain substack
> on a specific time.
> I thought I make a subtack for 'morning' one for 'afternoon' and
> one for 'evening' and in each stack are a number of cards with a
> videoplayer
> any idea on how to do this?
>
> eddie d
The way to master this is to work with seconds and a pending message:
on DisplayRightStack
local tMidnightSeconds
-----
put the short date into tMidnightSeconds
convert tMidnightSeconds to seconds
-- tDate contains the seconds from today at 0:00
if the seconds >= tMidnightSeconds + (9*3600) then -- 9 AM
<go stack "Morning" process>
else if the seconds >= tMidnightSeconds + (14*3600) then -- 2 PM
<close stack "Morning" process>
<go stack "Afternoon" process>
else if the seconds >= tMidnightSeconds + (20*3600) then -- 8 PM
<close stack "Afternoon" process>
<go stack "Evening" process>
else if the seconds < tMidnightSeconds + (9*3600) then -- before 9 AM
<close stack "Evening" process>
end if
-----
if "DisplayRightStack" is not in the pendingMessages then
send "DisplayRightStack" to me in 60 seconds
end if
end DisplayRightStack
See seconds, convert, pendingMessages, send and related topics in the
docs.
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list