Jump to content
Search Community

transform around point not working

mgason test
Moderator Tag

Recommended Posts

Hi,

I have dozens of working tweens in my project.

I have this code, I know the function runs because the glow and drop shadow appear.

When my code did not work I copied and pasted from the "widget" on greensock just to be sure my syntax was right.

It still does not work, no scaling around the point?

any ideas

Mark

 

 

import com.greensock.*;
import com.greensock.easing.*;

private function cutout(){
	TweenMax.to(about_mc.page_mc.nuCutout_mc, 0.1, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, distance:2, delay:0.5}});
	TweenMax.to(about_mc.page_mc.nuCutout_mc, 0.1, {glowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, delay:0.5}});
	TweenMax.to(about_mc.page_mc.nuCutout_mc, 1, {transformAroundPoint:{point:new Point(181,257), scaleX:0.5, scaleY:0.5}, ease:Elastic.easeOut});
	}

Link to comment
Share on other sites

I see several potential problems off the bat:

 

1) You put the delay inside your dropShadowFilter and glowFilter objects.

 

BAD: TweenMax.to(mc, 0.1, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, distance:2, delay:0.5}});

GOOD: TweenMax.to(mc, 0.1, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, distance:2}, delay:0.5});

 

2) You didn't import the flash.geom.Point class or the TransformAroundPointPlugin

 

3) Are you a member of Club GreenSock? Remember, the transformAroundPoint plugin is a membership benefit of Club GreenSock ("Really Green" level and above). It is not included in the free downloads. And if you do have the plugin, don't forget to activate it because it is not one of the plugins that is automatically activated inside TweenMax. See the Plugin Explorer for activation code (or the "getting started" article at http://blog.greensock.com/club/

 

Hope that helps.

Link to comment
Share on other sites

Thanks,

I did have flash.geom.Point, forgot to show that.

I am a member, I did not have the plugins activated.

 

So now I have it working, my mc rotates around the correct point but I have a new problem.

The mc is what appears to be a cutout from another larger mc (sheet of paper).

basically, larger mc has a hole in it and is on a lower layer. small mc on the top layer, is the shape of that hole and drops away.

The problem is when it rotates around its bottom left corner at the start of the animation it appears to be below the big mc. Once it is done animating is appears on top.

How do I fix that? I need the tween to be on top of everything.

 

thanks

mark

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