| Index: resources/news.xml
|
| ===================================================================
|
| --- resources/news.xml (revision 0)
|
| +++ resources/news.xml (working copy)
|
| @@ -0,0 +1,151 @@
|
| +<?xml version="1.0" encoding="utf-8"?>
|
| +<screenplay>
|
| + <event kind="onLoad">
|
| + <paint id="myPaint" antiAlias="true">
|
| + <color color="yellow"/>
|
| + </paint>
|
| + <rect left="0" top="0" width="240" height="320"/>
|
| + <matrix>
|
| + <scale center="[0,0]" x=".55"/>
|
| + </matrix>
|
| + <paint>
|
| + <color color="black"/>
|
| + </paint>
|
| + <rect id="backbar" left="0" top="5" height="22" width="500"/>
|
| + <paint>
|
| + <color id="col0" color="blue"/>
|
| + </paint>
|
| + <save>
|
| + <matrix>
|
| + <skew id="sk0" center="[300,0]" x="-1.1"/>
|
| + </matrix>
|
| + <rect id="rec0" top="0" left="300" height="32" width="110"/>
|
| + </save>
|
| + <paint textSize="18">
|
| + <color color="black"/>
|
| + </paint>
|
| + <text id="back0" x="301" y="21" text="End of the World!"/>
|
| + <paint textSize="18">
|
| + <color id="textcol0" color="yellow"/>
|
| + </paint>
|
| + <text id="fore0" x="300" y="20" text="End of the World!"/>
|
| + <matrix>
|
| + <translate y="50" x="-45"/>
|
| + </matrix>
|
| + <paint>
|
| + <color id="col1" color="blue"/>
|
| + </paint>
|
| + <save>
|
| + <matrix>
|
| + <skew id="sk1" center="[300,0]" x="-1.1"/>
|
| + </matrix>
|
| + <rect id="rec1" top="0" left="300" height="32" width="110"/>
|
| + </save>
|
| + <paint textSize="18">
|
| + <color color="black"/>
|
| + </paint>
|
| + <text id="back1" x="301" y="21" text="Some other news story!"/>
|
| + <paint textSize="18">
|
| + <color id="textcol1" color="yellow"/>
|
| + </paint>
|
| + <text id="fore1" x="300" y="20" text="Some other news story!"/>
|
| + <matrix>
|
| + <translate y="50" x="-45"/>
|
| + </matrix>
|
| + <apply>
|
| + <post/>
|
| + <set field="target" to="#script:0"/>
|
| + </apply>
|
| + </event>
|
| + <array id="selector" values="[0,1]"/>
|
| + <int id="index" value="0"/>
|
| + <event kind="keyPress" code="down" id="downpress">
|
| + <apply scope="myPaint">
|
| + <animate target="backbar" field="top" from="backbar.top" to="backbar.top+50" dur=".25"/>
|
| + <animate target="backbar" field="bottom" from="backbar.bottom" to="backbar.bottom+50" dur=".25"/>
|
| + </apply>
|
| + <apply scope="index">
|
| + <set field="value" to="index.value < selector.length-1 ? index.value+1 : selector.length-1"/>
|
| + </apply>
|
| + <apply>
|
| + <post/>
|
| + <set field="target" to="#script:selector.values[index.value]"/>
|
| + </apply>
|
| + <apply scope="downpress">
|
| + <set field="disable" to="index.value < selector.length-1 ? 0:1"/>
|
| + </apply>
|
| + <post target="enableup"/>
|
| + </event>
|
| + <event kind="keyPress" code="up" id="uppress" disable="true">
|
| + <apply scope="downpress">
|
| + <set field="disable" to="false"/>
|
| + </apply>
|
| + <apply scope="myPaint">
|
| + <animate target="backbar" field="top" from="backbar.top" to="backbar.top-50" dur=".25"/>
|
| + <animate target="backbar" field="bottom" from="backbar.bottom" to="backbar.bottom-50" dur=".25"/>
|
| + </apply>
|
| + <apply scope="index">
|
| + <set field="value" to="index.value ? index.value-1 : 0"/>
|
| + </apply>
|
| + <apply>
|
| + <post/>
|
| + <set field="target" to="#script:selector.values[index.value]"/>
|
| + </apply>
|
| + <apply scope="uppress">
|
| + <set field="disable" to="index.value > 0 ? 0:1"/>
|
| + </apply>
|
| + </event>
|
| + <event kind="user" id="enableup">
|
| + <apply scope="uppress">
|
| + <set field="disable" to="false"/>
|
| + </apply>
|
| + </event>
|
| + <event kind="user" id="0">
|
| + <apply scope="myPaint">
|
| + <animate from="col0.color" field="color" target="col0" to="red" dur=".25"/>
|
| + <animate from="textcol0.color" field="color" target="textcol0" to="white" dur=".25"/>
|
| + <animate from="sk0.x" blend="0" field="x" target="sk0" to="1.1" dur=".25"/>
|
| + <animate from="back0.x" field="x" target="back0" to="341" dur=".25"/>
|
| + <animate from="fore0.x" field="x" target="fore0" to="340" dur=".25"/>
|
| + </apply>
|
| + <apply scope="myPaint">
|
| + <animate from="col1.color" field="color" target="col1" to="blue" dur=".25"/>
|
| + <animate from="textcol1.color" field="color" target="textcol1" to="yellow" dur=".25"/>
|
| + <animate from="sk1.x" blend="0" field="x" target="sk1" to="-1.1" dur=".25"/>
|
| + <animate from="back1.x" field="x" target="back1" to="301" dur=".25"/>
|
| + <animate from="fore1.x" field="x" target="fore1" to="300" dur=".25"/>
|
| + </apply>
|
| + </event>
|
| + <event kind="user" id="1">
|
| + <apply scope="myPaint">
|
| + <animate from="col0.color" field="color" target="col0" to="blue" dur=".25"/>
|
| + <animate from="textcol0.color" field="color" target="textcol0" to="yellow" dur=".25"/>
|
| + <animate from="sk0.x" blend="0" field="x" target="sk0" to="-1.1" dur=".25"/>
|
| + <animate from="back0.x" field="x" target="back0" to="301" dur=".25"/>
|
| + <animate from="fore0.x" field="x" target="fore0" to="300" dur=".25"/>
|
| + </apply>
|
| + <apply scope="myPaint">
|
| + <animate from="col1.color" field="color" target="col1" to="red" dur=".25"/>
|
| + <animate from="textcol1.color" field="color" target="textcol1" to="white" dur=".25"/>
|
| + <animate from="sk1.x" blend="0" field="x" target="sk1" to="1.1" dur=".25"/>
|
| + <animate from="back1.x" field="x" target="back1" to="341" dur=".25"/>
|
| + <animate from="fore1.x" field="x" target="fore1" to="340" dur=".25"/>
|
| + </apply>
|
| + </event>
|
| + <event kind="keyPress" code="OK">
|
| + <apply>
|
| + <post/>
|
| + <set field="target" to="#script:'enter' + index.value"/>
|
| + </apply>
|
| + </event>
|
| + <event kind="user" id="enter0">
|
| + <post type="uri">
|
| + <data name="uri" string="http://www.cnn.com"/>
|
| + </post>
|
| + </event>
|
| + <event kind="user" id="enter1">
|
| + <post type="uri">
|
| + <data name="uri" string="http://www.cnn.com"/>
|
| + </post>
|
| + </event>
|
| +</screenplay>
|
|
|