3 Replies Latest reply on Jun 7, 2011 6:44 PM by darrylburke

    help SequentialTransition

    863138
      Good evening, I am writing because I need help for a web application that I'm developing.
      I have this code to make a sequentialTransition, but I do not work:
      package prova2;
      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Path;
      import javafx.animation.Timeline;
      import javafx.scene.shape.Circle;
      import javafx.scene.Node;
      import javafx.animation.transition.FadeTransition;
      import javafx.scene.shape.MoveTo;
      import javafx.scene.shape.CubicCurveTo;
      import javafx.scene.shape.VLineTo;
      import javafx.scene.shape.HLineTo;
      import javafx.scene.shape.ClosePath;
      import javafx.animation.transition.PathTransition;
      import javafx.animation.transition.OrientationType;
      import javafx.animation.transition.AnimationPath;
      import javafx.animation.transition.SequentialTransition;
      import javafx.animation.transition.ParallelTransition;
      var path=Path{
      elements: [
      MoveTo {
           x: 10, y: 100 }
      CubicCurveTo {
           controlX1: 50, controlY1: 10
           controlX2: 150, controlY2: 200
           x: 190, y: 10 }
      VLineTo {
           y: 190 }
      HLineTo {
           x: 10 }
      ]};

      var scene : Scene;
      var node=Circle {
           centerX: 100, centerY: 100
           radius: 40
           fill: Color.MAGENTA }

      var seq=SequentialTransition {
      node: node
      content: [
      FadeTransition {
      duration:3s
      autoReverse:true
      fromValue: -1.0
      byValue: 1.0},
      PathTransition {
      duration: 10s
      repeatCount: Timeline.INDEFINITE
      autoReverse: false
      orientation: OrientationType.ORTHOGONAL_TO_TANGENT
      path:AnimationPath.createFromPath(path)},
      ]

      }seq.play();
      Stage {
           title: "MyApp"
           scene: Scene {
                width: 600
                height: 450
                content: [
      node]
           }
      }
      Someone help me would know?
      Thank you very much.
      Stefania

      Edited by: unkus_nob on Jun 7, 2011 8:32 AM

      Edited by: unkus_nob on Jun 7, 2011 9:37 AM
        • 1. Re: help SequentialTransition
          812390
          hi stefania,

          just formatting your code in proper way that some one will definitely help you out soon.

          Good evening, I am writing because I need help for a web application that I'm developing.
          I have this code to make a sequentialTransition, but I do not work:
           
          package prova2;
          import javafx.stage.Stage;
          import javafx.scene.Scene;
          import javafx.scene.paint.Color;
          import javafx.scene.shape.Path;
          import javafx.animation.Timeline;
          import javafx.scene.shape.Circle;
          import javafx.scene.Node;
          import javafx.animation.transition.FadeTransition;
          import javafx.scene.shape.MoveTo;
          import javafx.scene.shape.CubicCurveTo;
          import javafx.scene.shape.VLineTo;
          import javafx.scene.shape.HLineTo;
          import javafx.scene.shape.ClosePath;
          import javafx.animation.transition.PathTransition;
          import javafx.animation.transition.OrientationType;
          import javafx.animation.transition.AnimationPath;
          import javafx.animation.transition.SequentialTransition;
          import javafx.animation.transition.ParallelTransition;
          
          var path=Path{
          elements: [
          MoveTo {
          x: 10, y: 100 }
          CubicCurveTo {
          controlX1: 50, controlY1: 10
          controlX2: 150, controlY2: 200
          x: 190, y: 10 }
          VLineTo {
          y: 190 }
          HLineTo {
          x: 10 }
          ]};
          
          var scene : Scene;
          var node=Circle {
          centerX: 100, centerY: 100
          radius: 40
          fill: Color.MAGENTA }
          
          var seq=SequentialTransition {
          node: node
          content: [
          FadeTransition {
          duration:3s
          autoReverse:true
          fromValue: -1.0
          byValue: 1.0},
          PathTransition {
          duration: 10s
          repeatCount: Timeline.INDEFINITE
          autoReverse: false
          orientation: OrientationType.ORTHOGONAL_TO_TANGENT
          path:AnimationPath.createFromPath(path)},
          ]
          
          }seq.play();
          Stage {
          title: "MyApp"
          scene: Scene {
          width: 600
          height: 450
          content: [
          node]
          }
          }
          Someone help me would know?
          Thank you very much.
          Stefania

          Edited by: 809387 on Jun 7, 2011 9:05 AM
          • 2. Re: help SequentialTransition
            863138
            I've tried it before, but even if I write well, the forum charged me badly formatted
            • 3. Re: help SequentialTransition
              darrylburke
              unkus_nob wrote:
              I've tried it before, but even if I write well, the forum charged me badly formatted
              Moderator advice: Please read the announcement(s) at the top of the forum listings and the FAQ linked from every page. They are there for a purpose.

              db