PDA

View Full Version : Load External Images Into A Mask



tomyknoker
04-02-2007, 12:00 AM
I have 6 frame labels on my stage and on each one I have a mask animation, it's the same animation but on each frame label loads a different image, basicaly the image just fade's into the mask. I was hoping to try and do this with actionscript, just not sure how. Would also like to load the images externally too if possible... Anyone have any ideas?

tomyknoker
04-02-2007, 12:22 AM
so i am able to lad an image from a folder no problem and have it fade in, but can i make it fade into an mc which contains a mask? this is what i've got so far



var myNewClip = this.createEmptyMovieClip("mclsub", this.getNextHighestDepth());
var myNewLoader = new MovieClipLoader();
var myNewListener = new Object();
var myNewTest = "images" + 2 + ".jpg";

myNewListener.onLoadInit = function (mclsub) { // Create fade in function
trace("load init");
mclsub._alpha=0; // Make mc 'mcl' _alpha 0
mclsub.onEnterFrame=function(){ // Create new function
mclsub._alpha +=15; // Speed 15

if(mclsub._alpha >=100){
delete mclsub.onEnterFrame;
}
}
};

Stage.addListener(myNewListener);
myNewLoader.addListener(myNewListener);
myNewLoader.loadClip(myNewTest,myNewClip);

BLiZZaRD
04-13-2007, 04:26 PM
Load the images into a blank MC BEHIND the mask (lower layer etc) You can do this externally (XML for example)

Use the AS to load the image, use the AS to tween your mask, start over at each frame label.