[Xerte] Re: animation
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Wed Nov 28 13:41:20 GMT 2012
You eed to wait for onAnimateCOmplete as Dave suggested. See the help for setting up events,
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ashok Ranade
Sent: 28 November 2012 12:44
To: Xerte discussion list
Subject: [Xerte] Re: animation
Dear Mr.Julian
Thanks for your prompt reply. But I have still not succeeded. I have attached a loop for creating wait. But now the spot remains in the original position (20,20) for the wait period and then the second animation starts. The first animation is just not getting executed(Seemingly). Incidentally the third parameter in the animate function should perhaps provide the delay automatically?
Well following is the modified code.
ball.animate(400,200,100,'linearTween');
var i:Number = 0;
while (true) {
if (i >= 20000) {
break; // this will terminate/exit the loop
}
i++;
}
ball.animate(100,100,100,'linearTween');
thanking you
yours sincerely
Ashok
On Wed, Nov 28, 2012 at 3:04 PM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
You're not waiting for the first animation to complete before starting the second one.
From: xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk> [mailto:xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk>] On Behalf Of Ashok Ranade
Sent: 28 November 2012 00:50
To: xerte at lists.nottingham.ac.uk<mailto:xerte at lists.nottingham.ac.uk>
Subject: [Xerte] animation
I am stuck in a simple animation. What I am trying to do is to move a small ball from the position (20,20) to position (400,200) and then to position (100,100). For this I have written the following code.
ball.animate(400,200,100,'linearTween');
ball.animate(100,100,100,'linearTween');
The animation from (20,20) to (100,100) is visible however the earlier animation from (20,20) to (400,200) is not seen at all. What can be the reason ? The total tree is as follows.(ID of the drawing is ball)
Page
Drawing
Interaction
Button
Code
Regards
Ashok
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk<mailto:Xerte at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20121128/82e53023/attachment-0001.html>
More information about the Xerte
mailing list