sncl
stable
  • Getting started

Contents:

  • Basic Concepts of sNCL
  • Default Properties
  • sNCL Elements
    • 1. Media Element
    • 2. Link Element
    • 3. Context Element
    • 4. Region Element
    • 5. Switch Element
    • 6. Macro Element
  • sNCL by Example
  • sNCL full grammar specification
  • sNCL vs. NCL
  • TODO
sncl
  • Docs »
  • sNCL Elements »
  • 2. Link Element
  • Edit on GitHub

2. Link Element¶

The syntax of the link element is:

Link = Condition^1 * (Comentario + Propriedade + Action)^0 * end

Condition = AlphaNumeric * Id * TermCond
TermCond = ("and" * Condition) + ("do")

Action = AlphaNumeric * Id * (Comentario + Propriedade) * "end"
1
2
3
onBegin media1 do
   start media2 end
end

The link element must have at least 1 condition and 1 action, in the case above, the condition is “onBegin media1” and the action is “start media2”, meaning that, when the media1 begin, the media2 will start.

The condition and the action can also have properties, like a delay:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
onBegin media1 do
   start media2 end
   delay: 10s
end

onBegin media1 do
   start media2
      delay: 10s
   end
end

As seen in the syntax of the element, it can have multiple conditions and actions. To declare more than 1 action, you simply add it, like a son element:

1
2
3
4
onBegin media1 do
   start media2 end
   start media3 end
end

And for multiple conditions, you can concatenate then with the “and” keyword:

1
2
3
onBegin media1 and onEnd media2 do
   start media3 end
end

In this stage of development, the compiler only accepts the and value, so, the link will only activate when media1 begin and media2 end. Adding the or value will come in later stages.

Below is a list of the accepted conditions and actions:

Conditions Event Type
onBegin  
onEnd  
onAbort  
onPause  
onResume  
onSelection  
onBeginSelection  
onEndSelection  
onAbortSelection  
onPauseSelection  
onResumeSelection  
onBeginAttribution  
onEndAttribution  
onPauseAttribution  
onResumeAttribution  
onAbortAttribution  
Actions Event Type
start  
stop  
abort  
pause  
resume  
set  
Next Previous

© Copyright 2017, TeleMidia-MA. Revision 4aa72804.

Built with Sphinx using a theme provided by Read the Docs.