Jump to content
Search Community

Text animation help please

retropunk test
Moderator Tag

Recommended Posts

Hey guys, I have been tasked with doing a simple animation of some text and I've hit a wall. I think I need a break.

 

I am attaching the current example but it's not quite right as you'll see. It doesn't loop properly for one.

I've also attached a screenshot so you can see the ideal effect in context.

 

I have a few ideas of how I can do it but I was hoping to hear from someone here. It's not a groundbreaking effect and I suspect someone here has already done it before. My Flash chops have slipped a little lately. :)

 

Basically I want to be able to animate the text so it appears to be waving. Similar to text on a flag type banner thats being pulled behind a plane in the sky. See attached image.

post-5536-0-37465700-1412198624_thumb.png

 

I could do this on the timeline with MovieClips but a code solution would be way better.

 

I'd appreciate another set of eyes on this. 

 

Thanks everyone

- Patrick

 

Link to comment
Share on other sites

Hey Patrick,

 

Try something like this:

 

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.text.*;
 
var stf : SplitTextField = new SplitTextField(myText);
 
function tween1():void
{
TweenMax.staggerTo(stf.textFields, 0.6, {y:20, scaleX:0.5, z:-10, rotationY:-40, rotation:-8, repeat:-1, yoyo:true}, 0.03);
}
 
 
tween1();
 
Its not perfect, but if you have it all moving horizontally behind the plane I imagine it will get the point across. 
  • Like 1
Link to comment
Share on other sites

AH! Yes I see what you are doing. I've never quite wrapped my head around yoyo for looping stuff.

This is totally workable for the effect I am going for.

Thanks so much Carl...you guys are the best. I wish other forums had your response time. They could learn a lesson from GSAPs methodology

 

btw I bought the GSAP Book from Noble Desktop.

The book is chock full of code goodies!

I am hoping to make the class in December. Still trying to work out the days off.

 

Thanks again

- Patrick

  • Like 2
Link to comment
Share on other sites

One more thing

 

Is there a scoping thing I need to check for?

 

The stop function here doesn't work.

var stf : SplitTextField = new SplitTextField(myText, "characters", 5, 5);

btnStart.addEventListener(MouseEvent.CLICK, startHandler);
btnStop.addEventListener(MouseEvent.CLICK, stopHandler);

function startHandler(e:MouseEvent):void
{
	TweenMax.staggerTo(stf.textFields, 0.8, {y:20, scaleX:0.98, z:-60, rotationY:-10, rotation:-4, repeat:-1, yoyo:true, ease:Cubic.easeOut}, 0.03);
}

function stopHandler(e:MouseEvent):void
{
	TweenMax.staggerTo(stf.textFields, 0.3, {y:20, scaleX:1, z:0, rotationY:0, rotation:0, ease:Quad.easeInOut, delay:5}, 0.01);
}

Thanks for the help

- P

Link to comment
Share on other sites

Hey Patrick,

 

Thanks for buying the book, and I'm very glad to hear you are getting value out of it. Cheers!

 

I don't think there should be any scoping issues here. 

I dropped your code into my file with a button and it worked fine.

Keep in mind that it will take 5 seconds to see the animation stop because of the delay:5 you have.

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