iTech Posted April 16, 2013 Share Posted April 16, 2013 Is there any way to set the alpha of an entire queue to 1 instead of individually setting them? For instance: var queue:LoaderMax = new LoaderMax({ name: 'queue', onComplete: display }); queue.append(new ImageLoader('image1.png', { width: 112, height: 107, x: 502, y: 426, bgColor: 000000, scaleMode: 'proportionalInside', alpha: 0, container: this })); queue.append(new ImageLoader('image2.png', { width: 112, height: 107, x: 746, y: 426, bgColor: 000000, scaleMode: 'proportionalInside', alpha: 0, container: this })); queue.append(new ImageLoader('image3.png', { width: 112, height: 107, x: 990, y: 426, bgColor: 000000, scaleMode: 'proportionalInside', alpha: 0, container: this })); queue.append(new ImageLoader('image4.png', { width: 112, height: 107, x: 1234, y: 426, bgColor: 000000, scaleMode: 'proportionalInside', alpha: 0, container: this })); Obviously there are more than 4 images being loaded but this is just for example. Link to comment Share on other sites More sharing options...
GreenSock Posted April 16, 2013 Share Posted April 16, 2013 Well, you could certainly just loop through the content like: var content:Array = queue.content; //returns an array of ContentDisplay objects if they're all ImageLoaders or SWFLoaders for (var i:int = 0; i < content.length; i++ ) { content[i].alpha = 0; } Or if you've got v12 of the tweening platform, you should be able to do this: TweenLite.set(queue.content, {alpha:0}); Is that what you were looking for? Link to comment Share on other sites More sharing options...
iTech Posted April 16, 2013 Author Share Posted April 16, 2013 That's absolutely perfect! Thanks for the quick response. When did v12 release? I have TweenMax but not TweenLite unfortunately. Link to comment Share on other sites More sharing options...
jamiejefferson Posted April 16, 2013 Share Posted April 16, 2013 Hmm not sure of the exact date, but v12 has been available for over a year and it's kind of great. TweenMax extends TweenLite, so if you have TweenMax available, you will also have access to TweenLite. There's no harm in using TweenLite after importing TweenMax, unless your tween needs to use a specific feature of TweenMax like repeat, yoyo etc. Link to comment Share on other sites More sharing options...
iTech Posted April 16, 2013 Author Share Posted April 16, 2013 Good to know, thanks. I'll give the TweenLite import a try. Link to comment Share on other sites More sharing options...
jamiejefferson Posted April 17, 2013 Share Posted April 17, 2013 Just to clarify, if you import TweenMax into the page, then TweenLite is automatically available - no extra import required. 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