I have a picture that I’m loading dynamically into a movieclip. My problem is that the entire picture loads in, when I’d just like the face to appear (not the white background of the picture). I read about “setMask” and thought that I could load the picture into a mask, but I’m not sure how. Can you help? How do you load a jpg into a mask with a fade-in effect?
On the first frame I have:
_root.createEmptyMovieClip("background", 1);
background.loadMovie("sunny.jpg");
background._x = 0;
background._y = 130;
_root.imageLoaded = true;
background._alpha = 0;
sunny.setMask(background);
stop();
On my background MC, I have:
onClipEvent (enterFrame) {
if (_root.imageLoaded == true and _root.background.getBytesLoaded() == _root.background.getBytesTotal()) {
if (_root.background._alpha<100) {
_root.background._alpha += 5;
} else {
_root.imageLoaded == false;
}
}
}
I’ll attach my attempt to this post!!