XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Jun 23日 16:16

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2015年 Dec 24日 04:43 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
When an animation or effect has completed it should be possible to call another effect or animation automatically.

eg.

You run this command to fade a layer:

aboutUsLayer.FadeTo(255,1);

Then you want the following action to be carried out only when the above animation has completed.

aboutUsLayer.visible = true;

The two cannot happen simultaneously as the fade effect is lost so one must happen after the other.

Other engines allow subsequent animations to stack one on top of another by allowing you to specify the routine/function to run when the animation is completed. The second action can then be placed in the subsequent function.

How is this achieved in Xwidgets?


Last edited by yereverluvinuncleber on 2015年 Dec 26日 07:53, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2015年 Dec 25日 22:40 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
It seems it can be done via the setTimeoutcommand. It is not ideal but it is do-able.

aboutUsLayer.FadeTo(255,1);
setTimeout("fadeDone",1000); //the timeout in milliseconds must match the fade measured in seconds.

function fadeDone () {
aboutUsLayer.visible = false;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group