Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
stompwampa

Apply mask to ImageLoader

Recommended Posts

How can I apply a mask to an ImageLoader object??

Link to comment
Share on other sites

An ImageLoader is just a class that does work for you, it's not visual in any way (it's not a DisplayObject) but it does create a ContentDisplay object into which it loads your image. You can use the ConentDisplay object immediately (even before the image loads). The ImageLoader's "content" property refers to the ContentDisplay. For example:

 

var loader:ImageLoader = new ImageLoader("1.jpg");
var content:ContentDisplay = loader.content;

addChild(content);
content.mask = myMask;

loader.load();

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