images#1.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <screenplay xmlns="urn:screenplay">
  3. <event kind="onLoad">
  4. <matrix id="initialMatrix" translate="[80,80]" />
  5. <paint id="imagePaint" antiAlias="true">
  6. <color color="lightpink" />
  7. </paint>
  8. <apply >
  9. <paint />
  10. <set begin="4" field="linearText" to="false" />
  11. </apply>
  12. <save>
  13. <matrix>
  14. <scale x="0.5" y="0.5" />
  15. </matrix>
  16. <image id="backImage" src="redcross.jpg" />
  17. <save>
  18. <matrix id="polyMatrix">
  19. <polyToPoly >
  20. <polygon>
  21. <moveTo id="pt1" x="0" y="0" />
  22. <lineTo id="pt2" x="256" y="0" />
  23. <lineTo x="256" y="256" />
  24. <lineTo x="0" y="256" />
  25. <close />
  26. </polygon>
  27. <polygon >
  28. <moveTo x="0" y="0" />
  29. <lineTo x="256" y="0" />
  30. <lineTo x="256" y="256" />
  31. <lineTo x="0" y="256" />
  32. <close />
  33. </polygon>
  34. </polyToPoly>
  35. </matrix>
  36. <paint id="paintFade">
  37. <color id="fade" />
  38. </paint>
  39. <image id="frontImage" src="bulgaria.jpg" />
  40. </save>
  41. </save>
  42. <apply begin="0.5" scope="polyMatrix">
  43. <animate id="pt1x" target="pt1" field="x" from="0" to="64" dur="0.5" repeat="3" />
  44. <animate target="pt1" field="y" from="0" to="-455" dur="0.5" repeat="3"/>
  45. <animate target="pt2" field="x" from="256" to="192" dur="0.5" repeat="3" />
  46. <animate target="pt2" field="y" from="0" to="-455" dur="0.5" repeat="3" />
  47. </apply>
  48. <apply begin="1" scope="backImage" >
  49. <set field="src" to="jet.jpg" />
  50. </apply>
  51. <apply begin="1" scope="frontImage" >
  52. <set field="src" to="redcross.jpg" />
  53. </apply>
  54. <apply begin="1.5" scope="backImage" >
  55. <set field="src" to="fire.jpg" />
  56. </apply>
  57. <apply begin="1.5" scope="frontImage" >
  58. <set field="src" to="jet.jpg" />
  59. </apply>
  60. <apply begin="2" scope="backImage" >
  61. <set field="src" to="chest.jpg" />
  62. </apply>
  63. <apply begin="2" scope="frontImage" >
  64. <set field="src" to="fire.jpg" />
  65. </apply>
  66. <apply begin="2" scope="paintFade" >
  67. <animate field="alpha" target="fade" from="1" to="0" dur=".5" />
  68. </apply>
  69. <post target="addCaptionFade" delay="2" />
  70. <post target="addLineCaption" delay="2" />
  71. <post target="scaleInitial" delay="3" />
  72. </event>
  73. <event kind="user" id="addCaptionFade" >
  74. <apply>
  75. <paint >
  76. <color id="captionFade" alpha="0" />
  77. </paint>
  78. <animate target="captionFade" field="alpha" from="0" to="1" dur="1" />
  79. </apply>
  80. </event>
  81. <event kind="user" id="addLineCaption" >
  82. <paint textSize="24" textAlign="center" > <!-- -->
  83. <shader />
  84. </paint>
  85. <text text="Images" x="70" y="160" />
  86. </event>
  87. <event kind="user" id="scaleInitial" >
  88. <apply scope="imagePaint" >
  89. <set field="linearText" to="true" />
  90. </apply>
  91. <apply scope="initialMatrix" >
  92. <animate field="scale" from="1" to=".5" dur="1"/>
  93. <animate field="translateX" from="80" to="145" dur="1"/>
  94. <animate field="translateY" from="80" to="172" dur="1"/>
  95. </apply>
  96. </event>
  97. </screenplay>