apply effect with code, what properties?

Posted by mgason 
apply effect with code, what properties?
November 13, 2009 04:47PM
How can you get the effects parameters from flasheff2 panel to use in your code.
How do you know which ones work?
Do you use pattern or Preset somehow?

I used the flasheff2 panel to check the properties for the effect.
GridSquares lists the below and I tried applying them, see my code.

pattern:RoundedSquareScale - I get undefined property
preset:DiagDown1 - I get undefined property
squareWidth
SquareHeight
cornerRadius - I get undefined property
groupDuration- I get undefined property

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.filter.gridSquares.FEFGridSquares;

var effect:FlashEff2Code = new FlashEff2Code();
addChild(effect);

var gridSquares:FEFGridSquares = new FEFGridSquares();
gridSquares.refresh = false;
gridSquares.pattern = RoundedSquareScale;
gridSquares.preset = DiagDown1;
gridSquares.squareWidth = 20;
gridSquares.squareHeight = 20;
gridSquares.cornerRadius = 10;
gridSquares.groupDuration = 20;

effect.addFilter(gridSquares);
effect._targetInstanceName = "about_mc.aboutHeader_mc";
Re: apply effect with code, what properties?
November 13, 2009 06:01PM
If I want to add the RoundedSquareScale symbol effect
with the default settings for DiagDown2
from my main class how would I do that

what must I import in my class?
I have added it from the panel to my swf so that my library has the parts for export.
(would they be purged if I used optimize fla and they are only called from the class?)

then in my function what do I need????

private function flashEffect():void{
what goes in here?
I got it working with the sample reflection code but could not work out all
the parts for this effect
}
Re: apply effect with code, what properties?
November 13, 2009 10:51PM
Ok,
so I have it working because I came across this tool which is the greatest thing.
It is an air application that generates all the code you need for any flasheff2 effects.
Just pick the name and preset!! copy and paste the code to your project.
Fully commented code or not your choice.
It worked perfectly, considering how hard it is to find all the parameters and presets info
this thing is awesome.
weird looking link name I know, but its real
I have nothing to do with the creator or the site
[www.didiaskforyouropinion.com]

his examples of animating the filters with tweener (could easily be tweenmax too) are really cool as well.
basically you can tween the values of the effect
[www.didiaskforyouropinion.com]
Re: apply effect with code, what properties?
November 14, 2009 09:22PM
mgason Wrote:
-------------------------------------------------------
> weird looking link name I know, but its real

The site name was a joke -- it's not directed at any particular person. My ISP plan offers a free web site, and I wanted something just for testing and sharing stuff. All the domain names I thought of were taken (big surprise), so here we are. I'm glad you found the app helpful. I've been thinking of updating it to generate class-based files, but I need more free time...

> his examples of animating the filters with tweener
> (could easily be tweenmax too)

Funny, I was just thinking about that today. Tweener has been discontinued, and version 11 of the GreenSock tweening platform is pretty amazing. It's on my to-do list.

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