The initial state of the element is a light grey, but it starts it at
dark grey and fades to my end color then back to the dark grey. The
Start color is FFFF66 which is a yellow. I'm not seeing this during
any point of the animation however.
Any help is much appreciated. Thanks!
-Kyle
Doesn't look like you are doing anything wrong, you're just creating
the effect, and setting the colours, then playing it.
What browser are you using? Do you get any log messages output when
you try and execute your application - the code should be a little bit
chatty if it comes across an issue in development mode.
Cheers,
Adam
Sorry for bit of delay, I'm really busy with some non IT stuff.
Seems to be some sort of combination of two issues - first the code
for parsing a colour in the form #RRGGBB is silently being ignored for
the setting of a start colour, and then the code to deal with starting
from transparency is overriding the start color setting.
You can create your own Highlight effect if you want by joining
together two ColorChange effects and use colour in format of
rgb(rrr,ggg,bbb) instead of #RRGGBB. For example:
String startCol = "rgb(100,100,100)";
String endCol = "rgb(255,255,100)";
Label testEl = new Label ("Some test Text");
//Setup first colour change
ChangeColor theEffect = new ChangeColor(testEl.getElement());
theEffect.setStartColor(startCol);
theEffect.setEndColor(endCol);
//Set up second colour change (the reverse)
ChangeColor theEffect2 = new ChangeColor(testEl.getElement());
theEffect2.setStartColor(endCol);
theEffect2.setEndColor(startCol);
// Set background colour of element to start colour
testEl.getElement().getStyle().setProperty("backgroundColor",
startCol);
//Play second effect after first
theEffect.chain(theEffect2);
//Play the effect
theEffect.play();
It will be some time before I get round to fixing so the above is
probably best way to go.
//Adam