Up to now we’ve seen how we load and instantiate plugins’ Incidents, how to instantiate groups and organise our Incidents and how we form a Clip.
There are cases that we might want to define a Clip but we don’t want to directly render it on a specific host element but rather use it as Incident and position it on another Clip’s timeline and on specific elements. In such a case when instantiating a Clip we don’t pass the host key on the properties but instead we pass a selector string, just like in any other Incident case. The Clip will create as many copies of itself as the selector applies to, it will render itself in all of the elements the selector targets and it will execute (play) all copies together on root Clip execution. This kind of Clips are called “Clip As Incident” or just “CASI”.
- First we create a normal Clip positioning it on a specific host:
- Then we create a CASI. Notice we don't provide a
hostbut rather a
- Let's put some animation on our CASI
- Finally, let's position our CASI on our root Clip, on millisecond 0 and execute our root Clip