Jump to content
Search Community

How do I add parameters to myFunction

flasp test
Moderator Tag

Recommended Posts

at onComplete I need to add the name of the movie being tweened so the next append can be started. But that takes that there is a parameter to myFunction. Ive simply tried adding one, but with no luck.

How can I get around this.

I need this because the tween-settings comes from xml and is of unknown length and therefore added by the increasing of a number (see snippet).

 

var animXML:XML= xyxrotationY

var animateArray=animXML.animation[0].animate;

function animation(mc){
anim = animateArray[nim].text();
animArray=anim.split(',');
for (i = 0; i < animArray.length; i++){
	objectProperty= animArray[i].split(':');
	propertyName = objectProperty[0];
	propertyValue = objectProperty[1];
	tween[propertyName] = Number(propertyValue);
	}
tl = new TimelineMax({onComplete:myFunction});
tl.append(new TweenLite(mc, 2, tween));
}
function myFunction(mc){
nim=nim+1;
if (nim<=animateArray.length()-1){
	animation(mc);
}
}
animation(green);

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