Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
list

blur

Recommended Posts

I'm trying to find an alternative to remove:true on blur. Looking for something that would ease the the blur out rather than suddenly removing it. any suggestions?

 

TweenMax.to(mc, 3, {blurFilter:{blurX:5, blurY:5, quality:3, ease:Quad.easeInOut, remove:true}, delay:2});

 

thanks beforehand

Link to comment
Share on other sites

This method uses 2 tweens:

 

import com.greensock.*;

 

TweenMax.to(mc, 1, {scaleX:2, scaleY:2, blurFilter:{blurX:20, blurY:20}})

 

TweenMax.to(mc, .3, {blurFilter:{blurX:0, blurY:0}, delay:.7})

 

//note the first tween never gets its blur values to a full 20 as the second tween interrupts and overwrites it.

Link to comment
Share on other sites

It would be better to use one instance instead, with the yoyo param on:

TweenMax.to(mc, 3, {blurFilter:{blurX:5, blurY:5, quality:3, ease:Quad.easeInOut, repeat:1, yoyo:true}, delay:2});

That will tween blur to 5, then back down to 0 using the same ease function.

Link to comment
Share on other sites

thx vonWolfehaus,

 

i have no idea where i got the idea that they were concurrently scaling or changing other properties. :shock: I think my wires are crossed.

the only advantage to having 2 tweens is that you can have the blur in duration be different than the blur out.

 

your suggestion most likely is better for what they are trying to do.

 

 

Carl

Link to comment
Share on other sites

Thanks for the reply. I originally wrote a line including yoyo:true only left out the repeat:1. I take it repeat:-1 means repeat indefinitely.

Link to comment
Share on other sites

Carol, you are absolutely correct.

 

List, you are correct as well (-1 does mean infinite repeats).

Link to comment
Share on other sites

The blur doesn't seem to fade away. It remains? would also like the mc to alpha easein from being invisible. trying to set the alpha and blur to 0 properly for this to work.

 

TweenMax.to(mc, 3, {blurFilter:{blurX:3, blurY:3, quality:3, ease:Quad.easeInOut, repeat:1, yoyo:true}, scaleX:1, scaleY:1});

Link to comment
Share on other sites

got some errors in where things are going in the {}

 

bad:

TweenMax.to(mc, 3, {blurFilter:{blurX:3, blurY:3, quality:3, ease:Quad.easeInOut, repeat:1, yoyo:true}, scaleX:1, scaleY:1});

 

good:

TweenMax.to(mc, 3, {blurFilter:{blurX:3, blurY:3, quality:3}, ease:Quad.easeInOut, repeat:1, yoyo:true, scaleX:1, scaleY:1});

 

If you want to fade it in, you will need to set the alpha of the mc to 0 either programmatically or in the Flash IDE prior to that tween running and then add an alpha:0 to the TweenMax

 

you can use a 0 duration tween to do this

TweenMax.to(mc, 0, {alpha:0});

 

or a fromTo tween

 

TweenMax.fromTo(mc, 3, {alpha:0, blurFilter:{blurX:0, blurY:0, quality:3}}, {alpha:1, blurFilter:{blurX:10, blurY:10, quality:3}, ease:Quad.easeInOut, yoyo:true})

 

blue code: are the from vars

red code: are the to vars

Link to comment
Share on other sites

I have it working.

 

Thank you

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