Using Button Patterns

Posted by dewsign 
Using Button Patterns
March 09, 2009 05:08PM
I'd like to use a button Pattern to create a drop shadow on rollover. I've acheved this with the FlashEff, but now I want to be able to do this for a document class level.

I've created a button pattern;

var butPatt:FEBDropShadow = new FEBDropShadow();
			butPatt.tweenDuration = 0.25;
			butPatt.rollOverStrength = 2;
			butPatt.pressStrength = 3;
			butPatt.color = 0x000033;
			butPatt.distance = 3;
			butPatt.angle = 60;
			butPatt.alphaShadow = 0.29;
			butPatt.blurX = 4;
			butPatt.blurY = 4;



I'd like to apply this to 4 textfields, each with a different effect,

txtEffect.buttonEffect = butPatt;
txtEffect2.buttonEffect = butPatt;
txtEffect3.buttonEffect = butPatt;
txtEffect4.buttonEffect = butPatt;

Each effect is then targetted to a different text field.

When I do this, which ever textfeild I roll over the last (txtfield4 , with txtEffect4 added ) shows the drop shadow?
do I have to write the block of code every time I want to add the button effect to a new textfield or movieclip?

Regards

DS
Re: Using Button Patterns
March 10, 2009 08:37AM
if you have more textfields that you want to act like buttons just add another txtEffect5.buttonEffect = butPatt; txtEffect6.buttonEffect = butPatt; as many times as you like.
Here is an example of a effect loaded from a document class: [www.flasheff.com]
Sorry, you do not have permission to post/reply in this forum.