Jump to content
Search Community

Overwrite Protection

SPotaszn test
Moderator Tag

Recommended Posts

Hi, is there anyway to specify that a Tween should not be overwritten?

 

Let's say that I am tweening a single property in multiple places, and in some of those places I want to use OverwriteManager.ALL_IMMEDIATE.

However, in other places I want to specify explicitly that tweens do not get overwritten (even by tweens using whose overwrite propery has been set to ALL_IMMEDIATE).

 

Is there a simple way to do this?

 

Thanks!

Link to comment
Share on other sites

No, that's currently not possible but could you help me understand a practical real-world example of when that would be useful? I can't think of any. Typically the AUTO mode solves most problems. I'd be hesitant to add a feature that makes tweens immune from being overwritten because that sounds like a recipe for a lot of debugging headaches as people start wondering why things aren't being overwritten properly and need to chase down tweens that excused themselves from the whole process :)

Link to comment
Share on other sites

Here's a boiled-down version of my real-world example:

 

I'm implementing a graph creation & visualization program. When a node is added to the graph, all of the edges draw themselves and then undraw themselves. Whenever a node is rolled over, all incident edges of the node draw themselves and then undraw themselves. The drawing and undrawing of edges is done through tweens.

 

So I have two places where I want to tween alphas, size, position, etc. of edges: on addition of new nodes and on rollovers of existing nodes.

 

Ideally, I'd like the node-addition tweens to supersede the node-rollover tweens. Something like, if a rollover tween starts, and it sees that there's already an addition tween going on, stop execution.

 

However, upon rethinking this issue, I think it's best to leave this check outside the tween level, as in, check if there node-addition tweens going on before even creating node-rollover tweens.

 

Thanks for your response and helping me see another possible and better solution!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...