Jump to content
Search Community

Newbie question!

sw00p test
Moderator Tag

Recommended Posts

Hi, I'm new to the tweening platform and trying to learn it atm. What I wanna create is a tween that makes my text look like it "swings" in like a swing coming towards you, then it swings 2-3 times back and forth and then stops. Basically like this image:

 

http://animated.pblogs.gr/files/10089-f ... md_wht.gif

 

only it would be from straight ahead, from the front and not from the side/front like this image.

 

What is the closest I can get to this and where shall I start? :) Would appreciate if I was just pointed in the right direction!

 

Thanks alot!

Link to comment
Share on other sites

I made a quick little demo for you:

http://snorkl.tv/dev/swing/

 

I know you are learning GreenSock right now, so this may be a little much to start with, but since you have multiple tweens running, it is best to sequence them with TimelineLite/Max

 

the code I used looks like:

 

import com.greensock.*;

import com.greensock.easing.*;

 

 

var tl:TimelineMax = new TimelineMax()

tl.append(TweenMax.fromTo(mc, 1, {rotationX:40}, {rotationX:-40, repeat:3, yoyo:true, ease:Quad.easeInOut, immediateRender:true}))
tl.append(TweenMax.fromTo(mc, 2, {rotationX:40}, {rotationX:0, ease:Back.easeOut, easeParams:[5]}));

 

the timing isn't perfect but it contains the basic meat of what you might use.

 

this might be a bit much to swallow from the start as it uses a number of GreenSock features packed into a small space.

 

focus first on how to get a single tween to swing an object:

 

TweenMax.to(mc, 2, {rotationX:180}

 

then investigate the repeat property and then TweenMax.fromTo http://www.greensock.com/as/docs/tween/ ... ml#fromTo()

 

TimlineLite/Max is super powerful, but it can be a touch overwhelming if you jump in before having a strong foundation with TweenLite/Max. Trust me, it is well worth the effort. http://www.greensock.com/timelinelite

 

I have a attached an cs4 fla. save it to a directory that has the greensock com folder.

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