Go Back   OpenLaszlo Developers Forums > Non-programming help and discussions > Development Tools and Practices

Development Tools and Practices Questions about development tools and practices. An appropriate place to talk about text editors, IDEs, and anything else that makes your development life easier.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-20-2004, 04:24 PM
antun antun is offline
Forum Administrator
 
Join Date: Jun 2002
Location: San Francisco
Posts: 1,678
antun is on a distinguished road
Animating an attribute

Just as with animating the x, y, width or height attributes, you can animate any numeric attribute of a view; you can also constrain physical view attributes to some algorithm that uses your animated attribute to obtain smooth complex animations:

Code:
<!-- sine curve -->
<canvas width="750">

    <view y="10" x="10"
          width="735" height="215" 
          bgcolor="0xeaeaea">
        <view y="${100 + 100*Math.sin(0.01745*this.xpos)}"
              x="${xpos}"
              width="15" height="15" bgcolor="red">

            <attribute name="xpos" value="0" type="number" />

            <animator attribute="xpos" from="0" to="720" 
                      duration="6000"
                      motion="linear" />
        </view>
    </view>

</canvas>
Enjoy!
__________________
http://www.antunkarlovac.com/blog/

Try out Webtop today:
http://www.gowebtop.com/
Reply With Quote
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exploring the New Attribute Syntax antun Development Tools and Practices 4 12-04-2006 03:13 PM
No datapointer method to insert a new attribute? m4tr1x General OpenLaszlo Programming 2 02-01-2006 05:03 AM
boolean attribute constrain bad value objectid General OpenLaszlo Programming 2 01-19-2006 07:33 AM
stretch attribute unexpected behavior ? dmcfarland General OpenLaszlo Programming 2 11-15-2005 07:43 AM
setter attribute fortetie General OpenLaszlo Programming 0 10-05-2005 02:57 AM


All times are GMT -8. The time now is 12:18 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.