0

Implementing animation functions in Kontx.elements

I am stuck here....

How would you implement a moveTo() command on a Kontx.element.Text()?

It appears that the Kontx.element.Text() does not hold any of the Text() element it is built from, correct?

by
5 Replies
  • QUOTE (WidgetRealm @ May 5 2009, 10:16 AM) <{POST_SNAPBACK}>
    It appears that the Kontx.element.Text() does not hold any of the Text() element it is built from, correct?


    Most KONtx classes (including KONtx.element.Text()) have a .element property off of the instance which points to the low level Kon element (Text() in the case of KONtx.element.Text()).

    That said, I must strongly advise you that animation performance on an embedded TV device (w/ 1/10th the RAM, 1/5th the CPU, and slower graphics than even a NetBook) is nothing like on the desktop and even doing simple animations at this time will likely produce lackluster results.

    We also do not officially support interacting with the low level Kon elements directly, but if you are who I think you are being an experienced desktop widget developer, my hope is you will not unintentionally shoot yourself in the foot.

    Future KONtx framework releases will provide animation functions that will be automatically tailored to the performance characteristics of the target platform.
    0
  • Perfect! Thank you.
    0
  • Is there a reason the Simulator would not show the moveTo() animation correctly?

    The item is waiting the animation period and then jumping to the new position rather than moving smoothly over the duration.
    0
  • QUOTE (WidgetRealm @ May 5 2009, 12:44 PM) <{POST_SNAPBACK}>
    Is there a reason the Simulator would not show the moveTo() animation correctly?

    The item is waiting the animation period and then jumping to the new position rather than moving smoothly over the duration.


    element.moveTo() type animations have been apparently deprecated since roughly Konfabulator 3.x days and are blocking animations and thus not supported well (if at all) on the TV/Simulator environments.

    An alternative is to use the animation objects to accomplish the same thing (which is "supported", but not necessarily meeting needed performance requirements).

    Deprecated Method:
    CODE
    MyTextObject.moveTo( toX, toY, duration );
    // (duration is specified in 1/10th of a second here)


    Current Method (with previously mentioned caveats):
    CODE
    var move = new MoveAnimation(MyTextObject, toX, toY, duration, easeType);
    animator.start(move);
    // (duration is specified in milliseconds here)
    // (easeType is from constants stored as: animator.kEaseIn, animator.kEaseOut, animator.kEaseInOut, animator.kEaseNone )
    0
  • Awesome. I did not see the Animator commands I am familiar with listed in the WDK pdf. This helps alot. Thank you.
    0

Recent Posts

in General - Yahoo! TV Widgets