Jump to content
GreenSock

WhiteDesign

SmoothImageLoader

Recommended Posts

I wasn't sure where to pop this question so I'll stick with the Tweening category!

 

I love the SmoothImageLoader! Brilliant! How do I apply a tween when it loads so it fades in, doesn't just appear!

 

Louisa

Link to comment
Share on other sites

Did I ask a really dumb question? :shock:

The solution is probably really obvious and now I've made myself look like a bit of an idiot!

 

I applied a tween to the movieclip holding the image but obviously that didn't work!

 

Louisa :?

Link to comment
Share on other sites

Nah, not a dumb question. It should be as simple as:

 

var loader:SmoothImageLoader = new SmoothImageLoader({url:"image.jpg", onComplete:onFinishLoading, maxWidth:200, maxHeight:100});
loader.alpha = 0;
function onFinishLoading():void {
TweenLite.to(loader, 1, {alpha:1});
}

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.
×