Jump to content
Search Community

Transform Around Point problem

vjschwartz test
Moderator Tag

Recommended Posts

I am trying to get certain bits of text to rotate around a point using this plugin, and though I carefully read instructions and believe I activated it correctly (maybe?), neither me nor my teacher can figure out why it won't work. I am very new to Flash, any help would be appreciated - thanks!

 

This is the code:

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import flash.geom.Point;

TweenPlugin.activate([TransformAroundPointPlugin]);

TweenLite.to(clockwork_mc, 1, {transformAroundPoint:{point:new Point(232,211), scaleX:0.5, scaleY:0.5}, ease:Elastic.easeOut});
stop();

And this is the error message I am getting:

 

Scene 1, Layer 'as', Frame 1, Line 1120: Access of undefined property TransformAroundPointPlugin. TweenPlugin.activate([TransformAroundPointPlugin]);

Link to comment
Share on other sites

Hmm, and you're using AS3, right? Please post an example FLA that demonstrates the issue (don't include the GreenSock code) so that we can just publish it and see the problem. Don't forget to zip the file(s) before posting. I'm sure we'll get this figured out.

Link to comment
Share on other sites

Yep, using AS3.

I just zipped it as it was because I wasn't sure exactly what you wanted me to leave out, sorry, but hope this is what you need. I am trying to rotate the words in the top left, so I started with the word Clockwork. Thanks very much.

Link to comment
Share on other sites

I took a peek at the FLA and it looks to me like the plugin is doing exactly what it's supposed to be doing, but I'm confused because you said you're trying to rotate the words but your tween only has scaleX and scaleY - why not rotation? And why are you using the new Point(94.4,6.5) coordinates? There's nothing really at that point on the stage - were you trying to visually make the clockwork_mc rotate around something specifically? What should the origin be?

 

If you want to visualize it, draw a very small red circle on the stage and make its origin be at x:94.4, y:6.5 and run your tween - you'll see that it is indeed acting as the origin for the transformations you applied, but I suspect there's a disconnect between what you're trying to do and what your code says you're trying to do.

Link to comment
Share on other sites

I see what you mean, but I am still not getting it to work. After your reply I changed the code to this:

 

TweenLite.to(clockwork_mc, 1, {transformAroundPoint:{point:new Point(61,11), rotation:30}, ease:Elastic.easeOut});

 

Then when I tested it, the .swf was still flashing white, so I was unable to see anything. So after playing around, I tried commenting out the activation codes, and was then able to see the page. Not sure what that's about, maybe I am not activating the plugin correctly.

 

I am still receiving this error:

 

Scene 1, Layer 'as', Frame 1, Line 1120: Access of undefined property TransformAroundPointPlugin. TweenPlugin.activate([TransformAroundPointPlugin]);

 

It seems there is a problem with the name, since it says undefined property (unless I am doing something stupid due to my inexperience with all of this, so apologies if that's the case). My teacher and I tried making a new movie to see if it was just my file, but got the same result.

 

Attached is my homepage .fla if you need it, and the test .fla

Thanks!

Link to comment
Share on other sites

Ah, it must have been typed incorrectly because a while back I tried everything to make it work, including messing around with the name.

 

However, it's still not working! Thanks for all your help - I am going to see if I can get someone around here to look at it, and maybe they will be able to see what I am not seeing.

 

Valerie

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