1<?xml version="1.0" encoding="utf-8" ?> 2<screenplay xmlns="urn:screenplay"> 3 <array id="colors" 4 values="[yellow,blue,green,red,orange,cyan,magenta,lime,navy,olive]" /> 5 <path id="path"> 6 <moveTo x="20" y="20" /> 7 <lineTo x="20" y="80" /> 8 <quadTo id="quad" x1="80" y1="80" x2="80" y2="20" /> 9 <close /> 10 </path> 11 12 <event kind="onLoad"> 13 <matrix id="initialMatrix" translate="[120,150]" /> 14 <paint id="pathPaint" antiAlias="true"> 15 <color color="lightpink" /> 16 </paint> 17 <apply > 18 <paint /> 19 <set begin="3" field="linearText" to="false" /> 20 </apply> 21 <apply scope="path" > 22 <animate target="quad" field="x1" from="10" to="120" dur="1"/> 23 <animate target="quad" field="y1" from="10" to="120" dur="1"/> 24 </apply> 25 <apply id="apply" mode="immediate" steps="colors.length-1" > 26 <group id="newPath"> 27 <matrix rotate="360/colors.length" /> 28 <paint > 29 <color id="color" /> 30 </paint> 31 <add use="path" /> 32 </group> 33 <set target="color" field="color" to="colors[apply.step]" /> 34 <set target="color" field="alpha" to=".5" /> 35 </apply> 36 <post target="addCaptionFade" delay="1" /> 37 <post target="addLineCaption" delay="1" /> 38 <post target="scaleInitial" delay="2" /> 39 </event> 40 41 42 <event kind="user" id="addCaptionFade" > 43 <apply> 44 <paint > 45 <color id="captionFade" alpha="0" /> 46 </paint> 47 <animate target="captionFade" field="alpha" from="0" to="1" dur="1" /> 48 </apply> 49 </event> 50 51 <event kind="user" id="addLineCaption" > 52 <paint textSize="24" textAlign="center" > <!-- --> 53 <shader /> 54 </paint> 55 <text text="Paths" x="10" y="145" /> 56 </event> 57 58 <event kind="user" id="scaleInitial" > 59 <apply scope="pathPaint" > 60 <set field="linearText" to="true" /> 61 </apply> 62 <apply scope="initialMatrix" > 63 <animate field="scale" from="1" to=".5" dur="1"/> 64 <animate field="translateX" from="120" to="60" dur="1"/> 65 <animate field="translateY" from="150" to="180" dur="1"/> 66 </apply> 67 </event> 68 69</screenplay> 70