Jump to content
Search Community

timeline lite question: tween.from working?

timaging test
Moderator Tag

Recommended Posts

Hi,

 

I'm trying to use Tween.from but it's throwing an error... should this be working?

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
TweenPlugin.activate([blurFilterPlugin, TransformMatrixPlugin]);
OverwriteManager.init()


var timelineWarsaw:TimelineLite = new TimelineLite();
timeline.append(TweenLite.from(photo, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}));
timeline.append(TweenLite.from(cal, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}), -1);
timeline.append(TweenLite.from(block, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}), -0.5);
timeline.append(TweenLite.from(date, 2, {alpha:0, transformMatrix:{y:"30"}, ease:Quad.easeInOut, blurFilter:{blurX:20, blurY:20}}));
timeline.append(TweenLite.from(location, 2, {alpha:0, transformMatrix:{y:"10"}, ease:Quad.easeInOut, blurFilter:{blurX:20, blurY:20}, delay:12.5}), -0.5);

Link to comment
Share on other sites

ok, nevermind. I see the issue and it was the naming of timeline.

 

BUT I do have another question.

 

In one of these setups, I want to set the timeline to run for say 5 seconds, then to that this.parent.gotoAndPlay(111, "Scene 1")

 

can I put in a total time somewhere, then have it do to another scene?

 

thanks,

Dave

Link to comment
Share on other sites

ok, so now it gets even more interesting. I have this file that I'm trying to add timelines to. I have one file named exactly the same and treated exactly the same. It even worked fine when I just used tweens. Now, it's not working at all:

var timelineBelfast:TimelineLite = new TimelineLite();
timelineBelfast.append(TweenLite.from(photo, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}));
timelineBelfast.append(TweenLite.from(cal, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}), -1);
timelineBelfast.append(TweenLite.from(block, 2, {alpha:0, ease:Quad.easeOut, blurFilter:{blurX:20, blurY:20}}), -1.5);
timelineBelfast.append(TweenLite.from(date, 2, {alpha:0, transformMatrix:{y:"30"}, ease:Quad.easeInOut, blurFilter:{blurX:20, blurY:20}}), -1.5);
timelineBelfast.append(TweenLite.from(location, 2, {alpha:0, transformMatrix:{y:"10"}, ease:Quad.easeInOut, blurFilter:{blurX:20, blurY:20}}), -1.5);

stop();

 

there's literally nothing different.

 

Also, I'd like to have each timeline delay. They are on separate layers so I need to delay each timeline individually. Can I do that?

 

Dave

Link to comment
Share on other sites

Sure, you can delay a TimelineLite's start time the same way you would do it with TweenLite:

 

var tl:TimelineLite = new TimelineLite({delay:5});

 

You can even change it later by directly accessing its "delay" property.

 

As far as why your other tweens aren't working at all, maybe you have compile errors in your code somewhere or maybe you didn't activate the BlurFilterPlugin or TransformMatrixPlugin. Tough to say without seeing your file and publishing it myself.

Link to comment
Share on other sites

Did you activate the plugins? Were you using TweenMax in the other file but not the new one? If so, keep in mind that TweenMax automatically activates a bunch of the plugins for you whereas TweenLite doesn't (to conserve file size). I'm sure there's a logical reason why it wasn't working in the new file (tough to know why without seeing the file)

Link to comment
Share on other sites

what if at the end of a timeline append, you want the last item to wait for 3 seconds before you loop back to the beginning? Is there a way to stop the last instance of a timeline?

 

yourtimeline.append(new TweenLite(iconShadow01, 0.1, {x:58, motionBlur:true, alpha:.4, ease:Quad.easeInOut}),-0.3);

 

 

 

function myFunction():void {

yourtimeline.play();

}

Link to comment
Share on other sites

Sure, that's what the "repeatDelay" special property is for in TimelineMax. Or drop a dummy tween into the end of your TimelineLite that pads it (with no tweening properties). Or you could use an onComplete that calls a TweenLite.delayedCall() that calls myTimeline.restart() after however many seconds. Lots of options :)

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