Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7842219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:16:09+00:00 2026-06-02T16:16:09+00:00

so here, I have a sequence of animations using Raphael: fade in curve fade

  • 0

so here, I have a sequence of animations using Raphael:

  1. fade in curve
  2. fade in ball 1
  3. animate ball 1
  4. fade in ball 2
  5. animate ball 2

however, with my code, steps 4-5 are initiated WHILE the steps 2-3 are still animating. How do I ensure steps 4 and 5 are initiated after the animations of 1-3 are complete? I’ve tried using setTimeout on my second function (ball2), but no luck.

View on JSFiddle or here:

Raphael("bounce", 640, 480, function () {
               var r = this,
                p = r.path("M0,77.255c0,0,269.393,37.431,412.96,247.653 c0,0,95.883-149.719,226.632-153.309").attr({stroke: "#666", opacity: 0, "stroke-width": 1}),
                len = p.getTotalLength(),
            e = r.circle(0, 0, 7).attr({stroke: "none", fill: "#000", opacity:0}).onAnimation(function () {
                    var t = this.attr("transform");
                });
             f = r.circle(0, 0, 7).attr({stroke: "none", fill: "#000",opacity:0}).onAnimation(function () {
                    var t = this.attr("transform");
               });
            r.customAttributes.along = function (v) {
                var point = p.getPointAtLength(v * len);
                return {
                    transform: "t" + [point.x, point.y] + "r" + point.alpha
                };
            };
            e.attr({along: 0});
            f.attr({along: 0});

            var rotateAlongThePath = true;
            function fadecurve(ca,ba,aa,ab){
                ca.animate({opacity:1},500);
                setTimeout(function(){fadeball(ba,aa,ab);
                },1000);
            }
            function fadeball(ba,aa,ab) {
                   ba.animate({opacity:1},400);
                   setTimeout(function(){run(ba, aa,ab);
                   },1000);
            }
            function run(ba,aa,ab) {
                   ba.animate({along: aa}, ab, ">", function () {
                    ba.attr({along: aa});
                });
            }
            function startbounce() {
                fadecurve(p,e,.9,400),
                setTimeout(function(){fadeball(f,.8,400);
                    },1000);
            }
            startbounce();
        }); ​
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:16:09+00:00Added an answer on June 2, 2026 at 4:16 pm

    According to Raphael’s documentation, the animate method takes a callback method as it’s fourth argument. That method could be used to initiate the next animation in your sequence (or after the third animation).

        function fadecurve(ca,ba,aa,ab){
            ca.animate({opacity:1},500,,function(){fadeball(ba,aa,ab);});
        }
    

    For example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here I have declared another virtual function in Derived class. #include <iostream> using namespace
Here I have piece of code, showing example of how I want to update
Here I have to send and receive dynamic data using a SysV message queue.
Here I have an arbitrary IEnumerable<T> . And I'd like to page it using
I have to repeat the image sequence I am using with Thread and AnimationDrawable
Here is my dilemma: I have an XML, where I want to insert animation_sequence,however,
I have here a code wherein I have an array of checkbox populated with
Sorry for asking basic questions here. Pardon me. I have a sequence a string
I have some sequence feature information I want to visualize. Here is some toy
Here' the situation. I have a sequence of 12 integration tasks to be run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.