XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently March 28th, 2024, 3:02 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: December 24th, 2015, 4:43 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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 December 26th, 2015, 7:53 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: December 25th, 2015, 10:40 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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: Bing [Bot] and 58 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:  
cron

Powered by phpBB® Forum Software © phpBB Group