Share Posted December 15, 2013 When I set the alpha during construction of an SWFLoader, it takes it and applies it fine. When I try to change it later, I always get this: Property alpha not found on com.greensock.loading.SWFLoader and there is no default value. What am I overlooking? Link to comment Share on other sites More sharing options...
Share Posted December 15, 2013 Hi, Yeah, SWFLoader instances are not display objects and they don't have an alpha property. SWFLoader's generate a ContentDisplay object (a beefed up Sprite) that they place their loaded content into. This is the object you most likely want to fade. When you place an alpha setting in the the SWFLoader constructor it automatically gets applied to that SWFLoader's ContentDisplay object which you can access via mySWFLoader.content. Try mySWFLoader.content.alpha = 0; Link to comment Share on other sites More sharing options...
Author Share Posted December 15, 2013 yes, this was the ticket. Just a heads-up for everybody else: keep in mind that alpha values in GS are delivered between the 0 and 1 range and not 0 and 100. Link to comment Share on other sites More sharing options...
Share Posted December 16, 2013 Glad Carl was able to help. I'd just like to clear up that alpha ranges aren't defined by GSAP, but by the version of AS used: 0-100 is the _alpha range in ActionScript 2. 0-1 is the alpha range in ActionScript 3. 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