Jump to content
Search Community

delay

chefkeifer test
Moderator Tag

Recommended Posts

I am trying to get the next tween to start -.5 into the tween before..just like the one you did in the video

 

i keep getting this error

1137: Incorrect number of arguments. Expected no more than 1.

 

here is my code

var buttonsDown:TimelineMax = new TimelineMax({paused:true});
buttonsDown.append(TweenMax.to(buttons.gibsonMill, 1, {height:"25"}));
buttonsDown.append(TweenMax.to(buttons.merchandise,1, {height:"25"}),-0.5);
buttonsDown.append(TweenMax.to(buttons.rentSpace,  1, {height:"25"}), -.5);
buttonsDown.append(TweenMax.to(buttons.contact,    1, {height:"25"}), -.25);
buttonsDown.append(TweenMax.to(buttons.about,      1, {height:"25"}),-.35);
buttonsDown.append(TweenMax.to(buttons,            1, {y:"525"}));

Link to comment
Share on other sites

that was the trick..funny i thought i had the right one...hard to keep up when your doing so many sites...

 

got that to work but for some reason i am cannot get the appendMultiple to work ...the all come down at the same time.

 

what am i doing wrong

var buttonsDown:TimelineMax = new TimelineMax({paused:true});
buttonsDown.insert(TweenMax.to(buttons.gibsonMill,  .5, {scaleY:1.10, ease:Elastic.easeOut}));
   buttonsDown.insert(TweenMax.to(buttons.merchandise, .5, {scaleY:1.10, ease:Elastic.easeOut}),-.5);
buttonsDown.insert(TweenMax.to(buttons.rentSpace,   .5, {scaleY:1.10, ease:Elastic.easeOut}), -.6);
buttonsDown.insert(TweenMax.to(buttons.contact,     .5, {scaleY:1.10, ease:Elastic.easeOut}), -.7);
buttonsDown.insert(TweenMax.to(buttons.about,       .5, {scaleY:1.10, ease:Elastic.easeOut}),-.8);
buttonsDown.appendMultiple(TweenMax.allTo([buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, 
										   buttons.contact, buttons.about], 2, {y:525, ease:Sine.easeIn, align:TweenAlign.START,stagger:1.3}));

Link to comment
Share on other sites

You're using the wrong syntax. You put "align:TweenAlign.START,stagger:1.3" in the TweenMax.allTo() vars object - don't do that :)

 

BAD: timeline.appendMultiple(TweenMax.allTo(myArray, 1, {x:100, align:TweenAlign.START, stagger:1.3}));

 

GOOD: timeline.appendMultiple(TweenMax.allTo(myArray, 1, {x:100}, 1.3));

 

EQUALLY GOOD: timeline.appendMultiple(TweenMax.allTo(myArray, 1, {x:100}), 0, TweenAlign.START, 1.3);

 

You can read full ASDoc documentation here: http://www.greensock.com/as/docs/tween/

 

Happy tweening.

Link to comment
Share on other sites

i keep playing with this thing and its not doing what i want...how do i get each button to scale 1.1, and then move down the y axis and stagger when clicked...

 

var buttonsDown:TimelineMax = new TimelineMax({paused:true});
buttonsDown.insertMultiple(TweenMax.allTo([buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, 
										   buttons.contact, buttons.about], .5, {scaleY:1.1, y:525}, .3));

 

trying to simulate this..is seems so smooth but i again seem to be over my head..

http://www.templatemonster.com/flash-templates/26252.html

Link to comment
Share on other sites

var buttons:Array = [buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, buttons.contact, buttons.about];
var buttonsDown:TimelineMax = new TimelineMax({paused:true});
buttonsDown.insertMultiple(TweenMax.allTo(buttons, .5, {scaleY:1.1}, .3), 0);
buttonsDown.insertMultiple(TweenMax.allTo(buttons, .5, {y:525}, .3), 0.5);

or

 

var buttons:Array = [buttons.gibsonMill, buttons.merchandise, buttons.rentSpace, buttons.contact, buttons.about];
var buttonsDown:TimelineMax = new TimelineMax({paused:true});
for (var i:int = 0; i     buttonsDown.insert( new TweenMax(buttons[i], 0.5, {scaleY:1.1}), i * 0.3);
   buttonsDown.insert( new TweenMax(buttons[i], 0.5, {y:525}), i * 0.3 + 0.5);
}

 

Or there are a few other ways to do it too, but hopefully this gives you a few ideas :)

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