Jump to content
Search Community

defaultEase analogy for onStart and onComplete? [SOLVED]

donJao test
Moderator Tag

Recommended Posts

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

Thanks.

 

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
	{
		transitions++;
	}

	public function remTranstion():void
	{
		transitions--;
	}

 

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.
×
×
  • Create New...