PDA

View Full Version : [Bug] Chaining effects is super-limited



Payam
2 Jul 2008, 6:57 PM
Currently, there are multiple effects available, however you cannot use MultiEffect class with them. The classes are not visible to be added, even though it makes perfect sense for them to be visible.
In BaseEffect although there are helper functions to do the effects, please public the effects too so they can be chained.

Second, if there is a completion listener, you cannot start another effect once the listener listens to it. It seems as though after the complete event is fired, there is still some remaining logic that conflicts with it.
To get around this, you can use a Timer class to delay calculation a bit.

Eg.


window.add(imageContainer);
window.layout();
window.show();

window.el().slideIn(Direction.DOWN,
new FxConfig(new Listener<FxEvent>() {
public void handleEvent(FxEvent be) {
Timer time = new Timer() {
public void run() {
fadeInImage(imageContainer);
}
};
time.schedule(10);

}
}));

That works

However this doesn't


window.add(imageContainer);
window.layout();
window.show();

window.el().slideIn(Direction.DOWN,
new FxConfig(new Listener<FxEvent>() {
public void handleEvent(FxEvent be) {
fadeInImage(imageContainer);
}
}));


It'd be great for the effects to work together in an easier fashion.

I'm currently implementing a Lightbox v2 implementation.
One obstacle is that the Slide logic should be more general.
For example, SlideIn assumes height/width = 1. If this was modified, slightly to take in parameters, then we can easily slide from any height/width to any other height/width.
Therefore, like lightbox v2, when going to the next image, we can do the proper transition effect.

Please help fix this, or let me know if I am incorrect on any issue.
General web users love fancy effects :)

Adam Ward
29 Sep 2008, 5:33 PM
I second this! The work around is acceptable, but it seems a pretty cludgy to use the Timer class when effect chaining, IMHO.

mortenmo
14 Jan 2009, 7:49 PM
I dont really see why isRunning was static, so I changed the Fx class from:

private static boolean isRunning;

to:

private boolean isRunning;

And now nesting works fine. I see now reason why that is static. I haven't seen any side effects yet but haven't played heavily with it either.

sven
15 Jan 2009, 12:07 AM
The FX classes will be completly rewritten for 2.0

jpnet
21 May 2009, 1:31 PM
The FX classes will be completly rewritten for 2.0


Is this still the case?

-JP