macros:example:setplaybackfadeintimemodular

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
macros:example:setplaybackfadeintimemodular [2021/07/21 13:34] – created icke_siegenmacros:example:setplaybackfadeintimemodular [2021/07/21 14:38] (current) icke_siegen
Line 102: Line 102:
 This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]]
  
-tbd+The **Main macro** ''Wiki.Macros.SetFadeIn'' defines a custom variable ''Wiki.Macros.SetFadeIn.Time'', than selects a number of playbacks, and sets them to this time. 
 +  * defining the variable is done in the block <variables>...</variables> 
 +  * in order to define a variable you need to  
 +    * give it an **id** (this also defines the 'full name' of the variable: it's ''macro id''.''variable id''  This also means that if you change the id of the macro you need to change the variable name wherever it is called, e.g. where the variable is set, changed, or read. 
 +    * the **type** defines the type of the variable, see also [[macros:types|]] 
 +    * the **assembly** is some dotnet specific thing (maybe the variable's scope). I'd guess that ''Avolites.Acw.Titan'' should be a good starting point when testing other variables. 
 +    * the **value** is the initial value the variable is set to when being defined. 
 +  * after this, selecting a playback and setting its time is all done in one step thanks to the [[macros:syntax:codeblocks|code blocks]] syntax: 
 +    * multiple instructions inside one step are bundled with ''{'' curly braces ''}'' 
 +    * instructions inside code blocks are separated with semicolons '';'' 
 +    * code blocks are also possible as conditional statements, in a very traditional way like  
 + 
 +<code>if (condition) 
 +      { 
 +        code being executed only if condition is true 
 +      }</code> 
 + 
 +  * for the instructions see [[macros:example:setplaybackfadeintime|]] 
 + 
 +The **calling macros** ''Wiki.Macros.SetFadeIn0'', ''Wiki.Macros.SetFadeIn1'' etc. now are really short: 
 +  * ''ActionScript.SetProperty("Wiki.Macros.SetFadeIn.Time", time:0)'' sets our cusom variable to a new value 
 +  * ''UserMacros.RecallMacroById("Wiki.Macros.SetFadeIn")'' calls our 'main macro' which than sets all playbacks to the new time
  
 ===== How to use it ===== ===== How to use it =====
  
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
- +  - if you want to add more playbacks to be affected simply add more steps in the 'main macro' ''Wiki.Macros.SetFadeIn'' 
-tbd+  - if you want to add more fade-teime valus then you only need to add some more 'calling macros'
  
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/setplaybackfadeintimemodular.1626874482.txt.gz · Last modified: 2021/07/21 13:34 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki