I pieced together this code and it works on its own in separate swf but I want to use it on my main site. I can get it to load and work at position 0,0 of my main stage. My problem is, I can’t figure out how to move it so the top left corner is at position 0,200 and still have the mask work.
Code:
_root.createEmptyMovieClip("image0_mc", 1);
_root.image0_mc.createEmptyMovieClip("imageHolder1_mc", 1);
image0_mc.imageHolder1_mc.loadMovie("http://rberry883.home.comcast.net/gamepics/apeblur.jpg");
_root.createEmptyMovieClip("image1_mc", 2);
_root.image1_mc.createEmptyMovieClip("imageHolder1_mc", 1);
image1_mc.imageHolder1_mc.loadMovie("http://rberry883.home.comcast.net/gamepics/ape.jpg");
_root.createEmptyMovieClip("mask_mc", 3);
mask_mc.lineStyle(3, 0x000000, 0);
mask_mc.beginFill(0, 100);
mask_mc.lineTo(0, 0);
mask_mc.lineTo(0, 200);
mask_mc.lineTo(250, 200);
mask_mc.lineTo(250, 0);
mask_mc.lineTo(0, 0);
mask_mc.endFill();
mask_mc._x = -250;
mask_mc._y = 0;
image1_mc.setMask(mask_mc);
image0_mc.onRelease = function() {
_root.mask_mc.onEnterFrame = function() {
this._x += 12;
if (this._x>=0) {
this._x = 0;
delete this.onEnterFrame;
}
};
};
Any help is appreciated.
here you can see how it works in its own swf: http://rberry883.home.comcast.net/game1.swf