Jump to content
Search Community

lochmann

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by lochmann

  1. Hi

    Im pretty new to tweenmax.

    Is it possible to order objects in z dimension? a bit like z-index in HTML.

    I have four objects which animate one at a time to the center of stage, but the overlap.

    I want to set the moving box to the front.

     

    My code look like this:

     

    //as2 code

    import com.greensock.*;

     

    var timeline:TimelineMax = new TimelineMax({repeat:-1, yoyo:false, repeatDelay:5});

     

    timeline.append(new TweenMax(box1, 1.0, {_rotation:"15", _xscale:150, _yscale:150, _x:"80", _y:"-50", ease:Back.easeOut, delay: 2}));

    timeline.append(new TweenMax(box1, 1.0, {_rotation:"-15", _xscale:100, _yscale:100, _x:"-80", _y:"50", ease:Back.easeOut, delay: 2}));

     

     

    timeline.append(new TweenMax(box2, 1.0, {_rotation:"-15", _xscale:150, _yscale:150, _x:"-160", _y:"50", ease:Back.easeOut, delay: 2}));

    timeline.append(new TweenMax(box2, 1.0, {_rotation:"15", _xscale:100, _yscale:100, _x:"160", _y:"-50", ease:Back.easeOut, delay: 2}));

     

    timeline.append(new TweenMax(box3, 1.0, {_rotation:"15", _xscale:150, _yscale:150, _x:"80", _y:"-50", ease:Back.easeOut, delay: 2}));

    timeline.append(new TweenMax(box3, 1.0, {_rotation:"-15", _xscale:100, _yscale:100, _x:"-80", _y:"50", ease:Back.easeOut, delay: 2}));

     

    timeline.append(new TweenMax(box4, 1.0, {_rotation:"-15", _xscale:150, _yscale:150, _x:"-160", _y:"-50", ease:Back.easeOut, delay: 2}));

    timeline.append(new TweenMax(box4, 1.0, {_rotation:"15", _xscale:100, _yscale:100, _x:"160", _y:"50", ease:Back.easeOut, delay: 2}));

×
×
  • Create New...