Jump to content

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

defaultEase analogy for onStart and onComplete? [SOLVED]

Recommended Posts



I was wondering if there's a way to assign functions for onStart and onComplete stats for every Tween?


I prefer to use static initialization method: TweenLite.to(...);


Thanks in advance.

Link to comment
Share on other sites

Nope, sorry - why would you want to do that anyway?


You could certainly create a proxy function of sorts, like:


function tween(target:Object, duration:Number, vars:Object):TweenLite {
   vars.onComplete = myCompleteFunction;
   vars.onStart = myStartFunction;
   return new TweenLite(target, duration, vars);

Link to comment
Share on other sites



I wonder why I didn't figure it out myself? So simple and yet a grate solution!


Why? Well, I would like to dynamically change the frame rate of a swf. Like that:

private function set transitions( value:int ):void
		m_transitionsTotal = value;
		stage.frameRate = m_transitionsTotal == 0 ? 1 : 30;

	private function get transitions():int
		return m_transitionsTotal;

	public function addTranstion():void

	public function remTranstion():void


So every Tween could just run addTransition() at the beginning and remTransition at the end.


Anyway, thanks for help!


Much appreciative!

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.