Jump to content
Search Community

MrT

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by MrT

  1. MrT

    Flashing - alpha problem

    Hi Carl, sorry, my mistake, that is now working a treat, thanks for assisting. Thanks Sean
  2. MrT

    Flashing - alpha problem

    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
  3. MrT

    Flashing - alpha problem

    Thanks for the reply, i probably should have used this code :- http://codepen.io/anon/pen/CAdry 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? Thanks Sean
  4. 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. http://codepen.io/anon/pen/CAdry 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
×
×
  • Create New...