Jump to content
GreenSock

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

triggering onComplete function once

Recommended Posts

When I use this code, it calls the function setMainNavBtns at the end of every movieClip tween

 

var nav_array:Array = [logo_mc, work_btn, about_btn, contact_btn, about_mc, breadcrumb_mc]
TweenMax.allFrom(nav_array, 1, { x:253, rotation:"40", onComplete:setMainNavBtns}, 0.1);

 

Is it possible to call it only once, at the end of the last tween

 

Thanks in advance

Link to comment
Share on other sites

yup, after the stagger amount you can add the the name of the onCompleteAll function like so

 

var nav_array:Array = [logo_mc, work_btn, about_btn, contact_btn, about_mc, breadcrumb_mc]
TweenMax.allFrom(nav_array, 1, { x:253, rotation:"40"}, 0.1, setMainNavBtns);

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.
×