MrT
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by MrT
-
-
Hi Carl,
i see what you are doing, but this is very specific, the red box and blue box (or sprites/buttons in my app) could be on or off or anywhere in between.
I need something that can handle any value from 0-1 for the starting alpha value and still give a consistent flash.
Thanks
Sean
-
Thanks for the reply,
i probably should have used this code :-
See the Pen CAdry by anon (@anon) on CodePen
var tlA = new TimelineLite({onComplete: function(){ this.restart();}})var tlB = new TimelineLite({onComplete: function(){ this.restart();}})//TweenLite.set("#redBox",{alpha:1})tlA.set("#redBox", {delay: 0.5,opacity:0}).set("#redBox", {delay: 0.5,opacity:1})//TweenLite.set("#blueBox",{alpha:0})tlB.set("#blueBox", {delay: 0.5,opacity:1}).set("#blueBox", {delay: 0.5,opacity:0})as i am just turning on and off rather than fading/tweening. In this example the blue box just stays on, i can understand the first .set doing nothing as the alpha is already at 1 but why does the 2nd .set not get processed half a second later and turn the blue box off?ThanksSean -
Hi,
i am attempting to get a basic flash for a button, and an alternative flash for another button but i keep getting glitches if i don't set an alpha value first, it's as if the tween doesn't occur because the alpha value is already at the .to value.
See the Pen CAdry by anon (@anon) on CodePen
var tlA = new TimelineLite({onComplete: function(){ this.restart();}})var tlB = new TimelineLite({onComplete: function(){ this.restart();}})//TweenLite.set("#redBox",{alpha:1})tlA.to("#redBox", 1, {delay: 0, alpha:0}).to("#redBox", 1, {delay: 0,alpha:1})//TweenLite.set("#blueBox",{alpha:0})tlB.to("#blueBox", 1, {delay: 0, alpha:1}).to("#blueBox", 1, {delay: 0,alpha:0})With the 2 tweens commented out blue box will glitch, commented back in the blue box is fine
Anyone got any ideas why?
Thanks
Sean
Flashing - alpha problem
in GSAP
Posted
Hi Carl,
sorry, my mistake, that is now working a treat, thanks for assisting.
Thanks
Sean