Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
bdavey311

Transform around point issue

Recommended Posts

Any reason why this wouldn't work? I've got two movieClips that both have instance names and I get this for the output message:

 

\\motionBlur tweens only work for MovieClips and TextFields

\\motionBlur tweens only work for MovieClips and TextFields

 

Here is the code.

stop();

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
TweenPlugin.activate([blurFilterPlugin, AutoAlphaPlugin, MotionBlurPlugin, ColorMatrixFilterPlugin, DropShadowFilterPlugin, TransformAroundPointPlugin]);

var tl:TimelineLite = new TimelineLite();
tl.insert( TweenLite.to(logoLeft, 1, {motionBlur:true, transformAroundPoint:{point:new Point(487,152), rotation:30}}) );
tl.insert( TweenLite.to(logoRight, 1, {motionBlur:true, transformAroundPoint:{point:new Point(487,152), rotation:30}}) );
tl.insert( TweenLite.to(middleLogo, 2, {_xscale:130, _yscale:130, autoAlpha:0, ease:Back.easeOut}), 0.4);

 

thanks in advance! MotionBlur rules.

Link to comment
Share on other sites

Hmm. It definitely sounds like the targets you're tweening are not MovieClips. Are you 100% positive they are? Could you post an example FLA that demonstrates the issue? Also, if you're using AS2, you should use "_rotation", not "rotation" in the transformAroundPoint.

Link to comment
Share on other sites

Yea sorry about that...the rotation was just one of the things I changed to test why it wasn't working and never changed it back. And they are movieClips. Still no go so I attached my FLA.

 

Thanks,

Brian

Link to comment
Share on other sites

Yep, the problem is that your targets are undefined. You're referencing "logoLeft", for example, when there's no such object on the stage. There's an "logoLeft3", but no "logoLeft".

Link to comment
Share on other sites

Ah. So I switched that as well earlier to do some testing to make sure the instance was unique but remember not being able to get it to work. So, thinking I'm crazy I tested it again with your solution and still nothing. Such confusion! ;)

 

Did you change it and get it to work?

Link to comment
Share on other sites

Did you change it and get it to work?

 

Yep, you just have to:

 

1) Make sure the tweens are referencing valid MovieClip instances

 

2) Change "rotation" to "_rotation"

 

3) import flash.geom.Point (you created a Point object but forgot to import the class)

 

Worked like a charm for me :)

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