Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8106396

Timeline value starts with first keyFrame value not with Timeline.time value when set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx1.2
    • fx1.0
    • javafx
    • None
    • Java FX 1.0.1 b02
      JRE 6u10
      Windows Vista SP1

      When specifying a Timeline.time value in a timeline, the value is taken
      into account after first initializing to the first value in a keyFrame.

      The following code
      ====================================
      import javafx.animation.Timeline;
      import javafx.lang.Duration.*;
      import javafx.animation.KeyFrame;

      var Number:Integer = 21;
      var dur:Duration = 21s;

      var timeline = Timeline{
          repeatCount: 5
          autoReverse: true
          time: dur
          keyFrames: [
          at (0s) {Number => 0 },
          at (26s) {Number => 26} ],
      }
      timeline.play();

      var currentPlayHead = bind Number on replace {
      println("Number change:");
      println(Number);
      }
      ==========================================
      would print:
      Number change:
      0
      Number change:
      21
      Number change:
      22
      Number change:
      23
      ....

      when expected to start directly with Number value 21.

            bchristi Brent Christian
            kbouyoucsunw Karim Bouyoucef (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: