正弦波運動

正弦波運動?って言い方が正しいかどうかはわかりませんが。。

この内容を表示するためには Adobe Flash Plugin が必要です。
(OpenLaszlo4.3.0 swf8)

<?xml version="1.0" encoding="UTF-8"?>
<canvas proxied="false" bgcolor="0xeeeeee"> 
  <view bgcolor="#ff0000" width="20" height="20" x="0" y="${r+(r*Math.sin(cnt))}">
    <attribute name="cnt"/>
    <attribute name="r" value="50"/>
    <animator attribute="cnt" from="0" to="$once{Math.PI * -2}" duration="1000" motion="linear" repeat="Infinity"/>
    <animator attribute="x" from="0" to="${canvas.width}" duration="7000" motion="linear" repeat="Infinity"/>
  </view>
</canvas>