[Xerte] Re: animation

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Dec 3 14:49:17 GMT 2012


Where is the code you want to execute ?

How will it know the animation has finished in order to broadcast the event?

You can't add a function as an event listener, if that's what you mean.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Ashok Ranade
Sent: 01 December 2012 06:35
To: Xerte discussion list
Subject: [Xerte] Re: animation

While the animation problem was solved through the use of event icon and setting the properties for icon and event, is there a way of doing it through code without using event icon on the tree? I tried ball.broadcast('onAnimateComplete') but it did not work

Regards

Ashok
On Wed, Nov 28, 2012 at 7:11 PM, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
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> [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 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




_______________________________________________
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/20121203/3e29d857/attachment.html>


More information about the Xerte mailing list