Jump to content
Search Community

Is it possible to create reusable filters?

AndyC test
Moderator Tag

Recommended Posts

...which is my clumsy way of asking, is it possible to create a dropShadow filter, for instance, that can be used in multiple tweens? Something like:

 

var myDropShadow:DropShadowFilter = new DropShadowFilter(0x000000, 5, 3, 3, 2);

 

then:

 

TweenMax.to(mc1, 5, {myDropShadow});

TweenMax.to(mc2, 5, {myDropShadow});

 

Or, do I simply have to call the same variables for the parameters in the various tweens?

Link to comment
Share on other sites

try this:

 

import com.greensock.*
import com.greensock.plugins.TweenPlugin; 
import com.greensock.plugins.DropShadowFilterPlugin; 
TweenPlugin.activate([DropShadowFilterPlugin]); 

var vars:Object = new Object();

vars.dropShadowFilter={blurX:5, blurY:5, distance:5, alpha:0.6}


TweenLite.to(mc, 3, vars);
TweenLite.to(mc2, 3, vars);

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