applying a filter and a show/hide animation look in AS

Posted by andy2099 
applying a filter and a show/hide animation look in AS
November 01, 2010 02:36PM
Hi,

I am trying to apply a filter and a show/hide animation to an image. This works fine when i nest two symbols one inside the other in FLASH, the one with the filter is the child symbol, and the one with animation is the parent symbol.

However, when i try and recreate this in AS, the filter applies, but the animation doesnt.

Any insight? Anyone has done this before?
Re: applying a filter and a show/hide animation look in AS
November 02, 2010 07:23AM
If you want to apply a filter and a show/hide effect is not necessary to have two movieclips one inside another with different flasheff applied on each one.
In order to work using code you need to make sure that you keep a correct structure of the code and childs on the stage.
Here is an example:

import com.jumpeye.flashEff2.filter.aura.FEFAura;
import com.jumpeye.flashEff2.symbol.alpha.FESAlpha;

var effect:FlashEff2Code=new FlashEff2Code()
addChild(effect)
var pattern:FEFAura=new FEFAura()
var pattern2:FESAlpha=new FESAlpha()
effect._targetInstanceName="clip"
effect.addFilter(pattern)
effect.showTransition=pattern2
Re: applying a filter and a show/hide animation look in AS
November 02, 2010 07:38PM
Hi Kneo!

Thank you, i think i spot where my problem lies: I am trying to use water reflection filter combined with RoundedSquares. This particular combo does not work, and i still havent managed to find a workaround. Any suggestions?


import com.jumpeye.flashEff2.symbol.squareEffect.FESRoundedSquareScale;
import com.jumpeye.flashEff2.filter.waterReflection.FEFWaterReflection;

var effect:FlashEff2Code=new FlashEff2Code()
addChild(effect)
var pattern3:FEFWaterReflection = new FEFWaterReflection();
var pattern4:FESRoundedSquareScale = new FESRoundedSquareScale();

effect._targetInstanceName="clip"
effect.addFilter(pattern3);
effect.showTransition=pattern4;
Re: applying a filter and a show/hide animation look in AS
November 03, 2010 02:30PM
Try to do this:

pattern3.refresh=true

and see if it works.
Re: applying a filter and a show/hide animation look in AS
November 04, 2010 03:46PM
Wuah !!! It worked like a charm! Well, except that I think it takes significant processing power; its lagging, lol. :) Thanks for pointing out that property to me :)

Cheers!
Sorry, you do not have permission to post/reply in this forum.