[Xerte] Re: animation

Dave Burnett d_b_burnett at hotmail.com
Sat Dec 1 13:13:49 GMT 2012



You might be able to capture it with a function, not sure.
But the point of the event trap is to stop the flow so the animation will run properly.
A function, even if it works, will not do that.
What's the problem with using the tree?

Date: Sat, 1 Dec 2012 12:04:50 +0530
From: ashok.ranade2 at gmail.com
To: xerte at lists.nottingham.ac.uk
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> 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] 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> 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] On Behalf Of Ashok Ranade

Sent: 28 November 2012 00:50
To: 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

http://lists.nottingham.ac.uk/mailman/listinfo/xerte
 



_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk

http://lists.nottingham.ac.uk/mailman/listinfo/xerte




_______________________________________________
Xerte mailing list
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/20121201/59c38120/attachment.html>


More information about the Xerte mailing list