Jump to content
Search Community

AutoAlpha isn't fading opacity, just switching display.

Mullingar_Dev test
Moderator Tag

Go to solution Solved by Mullingar_Dev,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm working on an assignment at the moment and having an issue with AutoAlpha.

Link: http://johncashin.net/test_sites/marc_comic_2/

In the 2nd and 4th frames, I want to have some elements fading in, however the elements just switch from invisible to visible pretty much instantly.

The code I am using on the animation is as follows:

 

var anim0 = function() {
TweenLite.set("#popup0",0,{Alpha:0, display:'hidden'});
TweenLite.to("#popup0",2, {Alpha:1, display:'block'});
}

 

 

var anim3 = function() {
TweenMax.set("#popup3",0,{autoAlpha:0});
TweenMax.to("#popup3",2,{autoAlpha:1, delay:2});
}

 

And neither of them are "fading" the opacity. Is there something I am missing?
Thanks in advance anyone who takes a look!
 

 

Link to comment
Share on other sites

hmm, anim1 shouldn't use Alpha, it should be alpha and I'm not sure why you are toggling display too. anim3 uses a duration of 0 in the set(), but set() doesn't use a duration.

 

This works: http://codepen.io/GreenSock/pen/hbCir

 

Learn about how to construct a CodePen demo: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...