Jump to content
Search Community

Small issue using TimelineMax and transformAroundCenter

peterPotter test
Moderator Tag

Recommended Posts

When TransformAroundCenterPlugin is used in conjuction with TimelineMax and the target has its transform modified in other ways as well, the TransformAroundCenterPlugin fails to work accurately.

 

Here is the code:

static public function buildDefaultZoomInTween( node:XML, cont:DisplayObjectContainer ):TweenMax
				{
					var targName:String = node.@target;
					var targ:Object = cont.getChildByName( targName );

					if(!targ) return null;

					var dur:Number = parseFloat( node.@duration );
					if(isNaN(dur)) dur = 0.4;

					var tempPopUp:String = String (node.@tempPopUp);

					var removePopUpSec:Number = parseFloat( node.@removeSec );
					if(isNaN(removePopUpSec)) removePopUpSec = 10;


					var delayTime:Number = parseFloat( node.@delay );
					if(isNaN(delayTime)) delayTime = 0;


					return TweenMax.fromTo(targ, dur, {alpha:0, transformAroundCenter:{scaleX:targ.scaleX, scaleY:targ.scaleY}}, {alpha:1, delay:delayTime, transformAroundCenter:{scaleX:1, scaleY:1}, ease:Expo.easeOut});

				}

Link to comment
Share on other sites

Okay, before you call it a "Major Bug", it'd be cool if you checked into it first :)

 

I cannot reproduce the problem at all - can you please post a simple example FLA that demonstrates the issue? I used your code and it worked perfectly for me.

 

And if you're messing with the transform.matrix elsewhere (I didn't see it in your code, but you mention it in your description), why would you expect it not to affect the TransformAroundCenter?

 

Hopefully if you post an FLA demo, we'll be able to get to the bottom of this quickly. Thanks.

Link to comment
Share on other sites

Sorry, Mate. We were having some major hair-pulling issues trying to fix the aforementioned problem, and we were frustrated, so I posted that message in the heat of the battle, and at that point we were convinced it was a TimelineMax problem. Our fault.

 

We managed to find a workable solution to the problem. I will post a follow up another day, but the issue was certainly not bug in TimelineMax.

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