lochmann Posted October 23, 2009 Share Posted October 23, 2009 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})); Link to comment Share on other sites More sharing options...
box86rowh Posted October 23, 2009 Share Posted October 23, 2009 In flash player 10 you can manage the z property and tween it, if you are targeting older versions you would have to look into papervision3d or some other 3d library Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now