Hi,
I'm using StyleManager.setStyleDeclaration() to setup custom dynamic
styles prior to creating components. Some of the styles being set are
effects. However, when I then initialize the various components, the
effects won't play. I can do a getStyle() call which confirms that
the effects are there, but they haven't been properly registered with
the EffectManager. I can force a single effect trigger to work by
calling, for example:
setStyle("hideEffect", getStyle("hideEffect"));
Looking at the UIComponent.as source, it appears that this is the code
which needs to be called (but isn't being called by default):
if (EffectManager.getEventForEffectTrigger(styleProp) != "")
EffectManager.setStyle(styleProp,this);
Using registerEffects("hideEffect"); works as well. However, because
the styles are dynamic, I can't know which triggers need to be added
at runtime. Not to mention, it's a hassle to include code to check
for this on every single component instance.
How can I force the component to automatically update all of it's
effects, registering them with the EffectManager?
Any guidance would be greatly appreciated.
Thanks,
James Pollman