We help IT Professionals succeed at work.
Get Started

Adding movieclip filter using AS without overriding or removing existing designer filters

NeverEndingFlashStories
on
476 Views
Last Modified: 2013-11-11
Hi,

I have a movieClip that already has a drop shadow filter applied to it through the designer. When the user has a mouse over, i want to add a mouse over listener that adds highlights to the movieclip. The code below correctly applies the new filter, but i cant seem to make it apply it while keeping the existing filter.
And when i do a MouseOut event, i lose both filters.

How do i add or remove the new filter without affecting the existing ones? thanks in advance :)
function applyfilter11q1(e:MouseEvent) {
	if (e.target.parent.name == "ex11q1a" || e.target.parent.name == "ex11q1b" || e.target.parent.name == "ex11q1c"){
		trace(e.target.parent.filters);
		//e.target.parent.filters.push(filter11q1);
		e.target.parent.filters = [filter11q1];
	}
}
 
function removefilter11q1(e:MouseEvent) {
	e.target.parent.filters = null;
}

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE