home *** CD-ROM | disk | FTP | other *** search
- Start {
- set sprite.autoMarkStoriesRead=0
-
- set $nStories = stories.count
- if ($nstories=0) then {
- end all
- }
-
- set frameFile = default
-
- set $empty = ""
- set $summary = 0
- set $curStory = -1
- set $direction = 1
-
- set $timing = $nstories - 1
-
- # Make the flash remain for at least 3 flips.
- # This will prevent 1 or 2 stories flash to disapear before the user will be able to intercat
- if ($timing < 3) then {
- set $timing = 3
- }
-
- call Flip
-
- show at (500,1000)
- animate toPixelOffset(0,-100) in 0.8 seconds slowEnd=5
-
- # Automatic mode loop
- set $timerIsRunning = 0
- call StartTimer
-
- repeat {
- pause until ($flipTime = 1)
- set $flipTime = 0
- call Flip
- } $timing times
-
- pause until ($flipTime = 1)
-
- call StopTimer
-
- onClick { nothing }
-
- animate toPixelOffset(0,76) in 0.6 seconds slowStart=3
- end all
- }
-
- StartTimer {
- if ($timerIsRunning = 0) then {
- set $timerIsRunning = 1
- newSprite proc=Timer
- }
- }
-
- StopTimer {
- if ($timerIsRunning = 1) then {
- end spriteName="Timer"
- set $timerIsRunning = 0
- }
- }
-
- Timer {
- repeat {
- pause for 3 seconds
- set $flipTime = 1
- pause until ($flipTime = 0)
- } forever
- }
-
- Next {
- call StopTimer
- MarkStoryAsRead story=$curStory
- set $direction = 1
- call Flip
- }
-
- Previous {
- call StopTimer
- MarkStoryAsRead story=$curStory
- set $direction = -1
- call Flip
- }
-
- ShowSummary {
- newSprite proc=Summary spriteName="Summary"
- }
-
- Summary {
- set $direction = 0
- set $summary = 1
- call Flip()
-
- if ($url = $empty) then {
- call NextLevel1Click
- } else {
- call UseSequence1
- }
- show
- pause forever
- }
-
- Minimize {
- if ($summary = 0) then {
- return
- }
- set $summary = 0
- end spriteName="Summary"
- }
-
- CheckNextLevel {
- set $smrtext = stories.item[$curStory].field[text]
- set $url = stories.item[$curStory].field[url]
- if ($smrtext = $empty) then {
- if ($url = $empty) then {
- set $nextLevel = 0
- set $nextLevelToolTip = "No summary/full story"
- } else {
- set $nextLevel = 2
- set $nextLevelToolTip = "Full Story"
- }
- } else {
- set $nextLevel = 1
- set $nextLevelToolTip = "Show Summary"
- }
-
- }
-
- Flip {
- set $color = "blue"
- set $smcolor = "black"
-
- set $curStory = $curStory + $direction
- if ($curStory = $nstories) then {
- set $curStory = 0
- } else if ($curStory < 0) then {
- set $curStory = $nstories - 1
- }
-
- call CheckNextLevel
- if ($nextLevel = 0) then {
- call NextLevel0Click
- } else {
- call UseSequence0
- }
-
- #
- # Show channel name
- #
- attachText rect (9,6,281,21) sequence=0 text=$schnname fontSize=15
- scrollBar=no color=black font="Arial" bold
-
- if (stories.item[$curStory].isDeleted = 1) then {
- set $color = mediumgray
- set $smcolor = mediumgray
- }
-
-
- #
- # Show title
- #
- set $title = stories.item[$curstory].field[title]
- attachText rect (14,28,320,62) sequence=0 text=$title fontSize=15
- scrollBar=no color=$color font="Times New Roman" underline
-
- #
- # Show story number
- #
- set $storNum = $curStory + 1
- set $storNum = $storNum + " of "
- set $storNum = $storNum + $nstories
- attachText rect (265,46,325,63) sequence=0 text=$storNum fontSize=14
- margins (0,5,0,0) scrollBar=no color=RGB(74,107,155) font="Arial" center
- bold
-
- #
- # Show summary
- #
- if ($summary = 1) then {
- MarkStoryAsRead story=$curStory
- set $smrtext = stories.item[$curStory].field[text]
- if ($smrtext = $empty) then {
- set $smrtext = "No summary available"
- }
- attachText rect (14,12,321,90) sequence=1 text=$smrtext fontSize=14
- color=$smcolor font="Arial" bold
- }
- }
-
- FullStory {
- openFullStory story=$curStory
- call Minimize
- }
-
- NextLevel {
- MarkStoryAsRead story=$curStory
-
- call StopTimer()
- if ($nextLevel = 2) then {
- call FullStory
- } else if ($summary = 0) then {
- call ShowSummary
- }
- }
-
- NextLevel0Click {
- set sequence=0
- set reference=midTop
- onClick {
- rect (330,1,355,21) toolTip="Close" does {
- end all
- }
- rect (326,50,351,70) toolTip="Previous Story" does {
- call Previous
- }
- rect (326,20,350,39) toolTip="Next Story" does {
- call Next
- }
- rect (281,1,304,24) toolTip="Keep Story" does {
- call StopTimer
- KeepStory story=$curStory
- }
- rect (305,0,327,25) toolTip="Delete Story" does {
- call StopTimer
- DeleteStory story=$curStory
- }
- }
- }
-
- NextLevel1Click {
- set sequence=1
- set reference=midBottom
- onClick {
- rect (330,2,347,20) toolTip="Minimize" does {
- call Minimize
- }
- }
- }
-
-
- #<BALIWIZARD SEQUENCES: Code created automatically by editing the frame file
- #<BALIWIZARD SEQUENCE=0>
- UseSequence0 {
- set sequence=0
- set reference=midTop
- onClick {
- rect (330,1,355,21) toolTip="Close" does {
- end all
- }
- rect (326,50,351,70) toolTip="Previous Story" does {
- call Previous
- }
- rect (326,20,350,39) toolTip="Next Story" does {
- call Next
- }
- rect (10,26,327,66) toolTip=$nextLevelToolTip does {
- call NextLevel
- }
- rect (305,0,327,25) toolTip="Delete Story" does {
- call StopTimer
- DeleteStory story=$curStory
- call Next
- }
- }
- }
- #<BALIWIZARD SEQUENCE=1>
- UseSequence1 {
- set sequence=1
- set reference=midBottom
- onClick {
- rect (327,1,349,19) toolTip="Minimize" does {
- call Minimize
- }
- rect (14,13,323,91) toolTip="Full Story" does {
- call FullStory
- }
- }
- }