Share Posted May 4, 2016 Hello! I know the difference between opactiy and autoAlpha: But what is the difference between opacity and alpha? Yes I realise that opacity is a css property: But if you use alpha on a dom object what is the difference to using opacity? I am sure this is a really dumb question, I must have missed something. Thankful for reply, Snoop out, .S 1 Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 No question is a dumb question. I do not know the answer. Would love to hear it. 2 Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 Not a dumb question - alpha is simply an alias for opacity. No difference whatsoever. It was added originally to help consistency with the Flash API (Flash always used "alpha"). There were a lot of GSAP users coming from the Flash world at the time Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 Me, for example! Link to comment Share on other sites More sharing options...
Author Share Posted May 4, 2016 Not a dumb question - alpha is simply an alias for opacity. No difference whatsoever. It was added originally to help consistency with the Flash API (Flash always used "alpha"). There were a lot of GSAP users coming from the Flash world at the time Me included among those folks as I have a well thumbed copy of 'HTML5 for Flash developers' . Great to know, one less gray hair today Thanks .S Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 If you use Animate CC to write GSAP code for its html5 canvas output be sure to use alpha as EaselJS objects do not have an opacity property. Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 As I know autoAlpha is the best, because it is turning off the DOM element with "visibility:hidden" when i'ts opacity is 0. Am I right? Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 I'm not sure I'd say "best" in every case, but yes, autoAlpha has the added benefit of toggling visibility when it makes sense. There's a very slight performance hit during the tween due to the fact that it has to control that additional property but it's pretty negligible. From a rendering standpoint, it is definitely cheaper for the browser if visibility is set to hidden. Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 Also worth noting that some game platforms (Phaser.js for example) have alpha properties on their sprites, and not opacity. Link to comment Share on other sites More sharing options...
Share Posted May 4, 2016 Anyone remember the window mode tricks we had to employ when things like drop down menus appeared behind SWFs? 1 Link to comment Share on other sites More sharing options...
Share Posted May 6, 2016 Hello somnamblst,I believe the wmode you were looking for is wmode="transparent" wmode="transparent" https://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html Link to comment Share on other sites More sharing options...
Share Posted July 21, 2016 I was about to post the same question as Snoop. The RGBA acronym and CSS3 property of the same name defines the acronym as Red, Green, Blue, and Alpha. Where alpha channel is also called the opacity channel. I kept seeing the term autoAlpha in the GreenSock ActionScript API Docs and I am glad I found this discussion. Link to comment Share on other sites More sharing options...
Share Posted July 21, 2016 Hello KerryRuddock autoAlpha is part of the GSAP CSSPlugin for GSAP JS: http://greensock.com/docs/#/HTML5/GSAP/Plugins/CSSPlugin/ autoAlphaIdentical to opacity except that when the value hits 0 the visibility property will be set to "hidden" in order to improve browser rendering performance and prevent clicks/interactivity on the target. When the value is anything other than 0, visibility will be set to "inherit". It is not set to "visible" in order to honor inheritance (imagine the parent element is hidden - setting the child to visible explicitly would cause it to appear when that's probably not what was intended). And for convenience, if the element's visibility is initially set to "hidden" and opacity is 1, it will assume opacity should also start at 0. This makes it simple to start things out on your page as invisible (set your css visibility:hidden) and then fade them in whenever you want.Example of usage: //fade out and set visibility:hidden and opacity to 0 TweenLite.to(element, 2, {autoAlpha:0}); //in 2 seconds, fade back in with visibility:visible and opacity to 1 TweenLite.to(element, 2, {autoAlpha:1, delay:2}); 3 Link to comment Share on other sites More sharing options...
Share Posted July 27, 2016 Hmm, I have noticed some performance differences between the two Alpha seems to tween bitmaps more smoothly. Maybe it is my imagination Link to comment Share on other sites More sharing options...
Share Posted July 28, 2016 @cwiens@shutterfly.com what do you mean by two Alpha ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now