Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jclaine

Manual Updating

Recommended Posts

I'm trying to plug this into my custom framework before I pull the trigger on a commercial licence and I might be asking a super noob question but I have looked through a bit of the documentation and from what I can tell there is no way of manually updating a tween through a external function.

 

bool = true;
TweenLite.to(someMC, frameCount, {useFrames:true, updateOnFunction:updateTween, onComplete:tweenComplete});

public function render():void {
  if(bool) updateTween();
}

public function tweenComplete():void {
  bool = false;
}

 

 

I'm sure I can program some roundabout way to get this to work but I am hoping I am simply blind Xp

Link to comment
Share on other sites

If by updating a tween you mean changing it's properties values dinamicaly than you could use dynamicProps plugin or use TweenMax's updateTo method (you could use startAt parameter to specify starting values)

Link to comment
Share on other sites

And if you want to render a tween at a particular time/position, you can simply set its currentTime property. But if you're asking if you can unhook the core engine ENTER_FRAME updating mechanism and plug in your own, no, not in v11. However, in v12 there are some nice enhancements that make this easier. You can add listeners to the core "tick" event dispatcher to run your own logic after each update too. Again, that's only in v12 though which is in beta right now.

Link to comment
Share on other sites

I see, that wouldn't be too hard to get working. I am curious though, I read through the licencing details and I didn't see anything about modifying the code. Is it with in my licencing privileges to modify the core if I choose to do so (keeping all of your copyright notices and headers intact of course)?

 

I should say I am liking it so far, I used it this weekend for the first time in a Ludum Dare game (prototype really) for the screen shake and the boulders dropping animations.

Link to comment
Share on other sites

Absolutely, you can make edits to the code as long as you leave the copyright notices intact and don't redistribute your edited copies (except as a part of your work product if necessary). The reason we don't want the edited copies distributed is so that it doesn't cause problems in the marketplace, like if there are various flavors of the engine out there with different feature sets, compatibility, etc. which could get really frustrating and confusing for end users. But we definitely want to let you make any edits you need to make your game/app/site work as you intend.

 

Sound fair?

Link to comment
Share on other sites

Absolutely. Thank you for the quick responses as well.

Link to comment
Share on other sites

  • 1 year later...

https://code.google.com/p/restless-engine/

 

So after much development, I have a non modified version of your tween engine updating my engine's core loop and it works very well. The engine's not super pretty right now but it's functional.

 

Thanks for such a great product. Please feel free to let me know if you want something reworded  or clarified in the description. Cheers.

  • Like 1
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.
×