<canvas height="100" width="100%"> <view bgcolor="red" width="100" height="100" onclick="this.myAnimator.doStart()"> <animator name="myAnimator" attribute="x" to="100" duration="1000" start="true"/> </view> </canvas>