antun
09-23-2003, 03:10 PM
You can apply an animation to a layout, just like an attribute of a view:
<canvas>
<class name="box" bgcolor="red" width="10" height="10" />
<view>
<box/>
<box/>
<box/>
<box/>
<box/>
<simplelayout axis="x" spacing="5">
<animator id="anm" attribute="spacing" to="20"
duration="1000" start="false"/>
</simplelayout>
</view>
<button onclick="anm.start()" y="100">Animate</button>
</canvas>
Enjoy!
<canvas>
<class name="box" bgcolor="red" width="10" height="10" />
<view>
<box/>
<box/>
<box/>
<box/>
<box/>
<simplelayout axis="x" spacing="5">
<animator id="anm" attribute="spacing" to="20"
duration="1000" start="false"/>
</simplelayout>
</view>
<button onclick="anm.start()" y="100">Animate</button>
</canvas>
Enjoy!