Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom event when method's tweens end

Status
Not open for further replies.

maguskrool

Technical User
Dec 11, 2006
77
PT
Hello.

For now I merely want to know if what I need is possible to accomplish in AS3. I think so, but not sure how.

I have several class methods that each perform several tweens and I need to know when those tweens end so I can act on that information. The tweens are class variables, so they'll be used by several methods. Because of this, I cannot - ok, I can, but it's inellegant at the very least - respond solely to the TweenEvent.FINISH and other tween events.

So what I need is for the methods to fire custom events when all the tweens they're performing finish. That way, I can create nice event handlers that deal with whatever I need to happen afterwards.

Is this possible? I'm not sure what sort of parameters would be involved in a solution.

Thanks in advance.

 
Hi Kenneth and thank you for your reply.

Yes, I can have that, some sort of variable (or several) that refers to a function and have a listener check its value every frame. I was hoping to avoid this sort of listener, though, because having too many could slow down the .swf play, right?

<a href=" alt="vivóeusébio - design collective" title="vivóeusébio - design collective">vivóeusébio - design collective</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top