Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to check is there any active transitions on object?
Started by Eritar May 09 2017 11:25 AM

3 replies to this topic
transitions transition check active

Best Answer bjsorrentino , 09 May 2017 - 11:42 AM

Hi @tolstyak0777,

At this time, not directly. You could use an onComplete listener for the transition to know when it's finished, setting a property on the object when so, or something similar to that, but there's not a function to directly see if the object is "undergoing a transition".

 

Best regards,

Brent

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Eritar

[GLOBAL: userInfoPane.html]
Eritar
  • Observer

  • 15 posts
  • Corona SDK

I can manipulate transitions by transition.pause/resume/cancel/etc(object), but can I check, is there any active transitions at the moment?



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

  Best Answer

Hi @tolstyak0777,

At this time, not directly. You could use an onComplete listener for the transition to know when it's finished, setting a property on the object when so, or something similar to that, but there's not a function to directly see if the object is "undergoing a transition".

 

Best regards,

Brent



[TOPIC: post.html]
#3

Eritar

[GLOBAL: userInfoPane.html]
Eritar
  • Observer

  • 15 posts
  • Corona SDK

Could you add function which can do that in further updates, please? That would save me giant amount of work.

Thx



[TOPIC: post.html]
#4

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,108 posts
  • Corona SDK

@tolstyak0777 this would be simple to do with some abstraction... and extend the transition library.

 

Simply create a wrapper function for the transaction library that sets an isTransitioning = true property, does your transition and add an onComplete handler to nil it out.

 

Then at any time you could do  if obj.isTransitioning then .....




[topic_controls]
[/topic_controls]