I load a .jpeg into a movieClip and the mask runs. I need to beable to move the .jpeg to a seperate movieClip so I can load a new .jpeg into the original movieClip and run the mask again.
Can this be done?
Printable View
I load a .jpeg into a movieClip and the mask runs. I need to beable to move the .jpeg to a seperate movieClip so I can load a new .jpeg into the original movieClip and run the mask again.
Can this be done?
I'm sure there is a better way to do what you're asking than trying to move a bitmap around from one mc to the other. Explain what exactly you're wanting to accomplish and maybe we can find a better way.
I have a multiple .jpegs loading into a MC one after another with a time delay and an entry masking transition. I need to move the .jpeg to a lower MC so it doesnt disaper when the next image transitions in.
Instead of loading the all jpg into the same mc and fading you need to load each jpg into a separate mc and apply the transition. Just load one below the other and fade(or whatever the transition) out on top. When you get to the end use swapDepths or some other means of getting them on top of each other again and do your process again.
Then I guess my question would have to be: how do I actionscript a mask to work on a specific movieClip.
ie. mask_MC.mask("container"+k);
look into setMask. Make a movie clip to be used as the mask and then use
isMaskMc.setMask("maskedMc");
I will monkey around with it in the morning. Thank you for your help
I got it to work.
just the opposite of what you thought but close:
maskedMc.setMask("MaskMc");
Here is my working code as of now:
Quote:
_global.k = 1;
function nextPic() {
clearInterval(setTime1);
trace(">> k = " + k);
var loadListener:Object = new Object();
loadListener.onLoadComplete = function(target_mc:MovieClip):Void {
trace(">> loadListener.onLoadComplete()");
target_mc.setMask(_root.picMask);
_root.picMask.gotoAndPlay(2);
if (_root.picMask._currentframe = _root.picMask._totalframes) {
setTime1 = setInterval(nextPic,5000);
}else if (k > 11) {
clearInterval(setTime);
}
}
loadListener.onLoadInit = function(target_mc:MovieClip):Void {
trace(">> loadListener.onLoadInit()");
}
if (k < 12) {
var container:MovieClip = empty.createEmptyMovieClip("container" + k, k);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
mcLoader.loadClip("http://www.address/madeup/" + k + ".jpg", "empty.container" + k);
k++
clearInterval(setTime);
}
}