flash mask controlled by user
- Started
- Last post
- 6 Responses
- redFridge
anyone have an example or tutorial of a flash mask being created or modified by a user?
like they could select an area on the screen to mask by clicking and dragging. :)
- spiralstarez0
Definitely possible... Just try it your self.
Create a mask, and then give it and instanceName and make it mask an image.
Then, put this actionscript:
instanceName._x = _root._xmouse
and then it will follow the mouse on the horizontal.
if you want to do it on the vert, then it's just:
instanceName._y = _root._ymouse
May not be what you are looking for but it gives you the basis for controlling the mask by the user. Then you just have to apply it to what you want. Sorry I don't have time to link a file so hopefully that helps!
- F_180
make a movie clip (whatver you want) in your first frame.
then, attach this to the clip
onClipEvent (load) {
_root.createEmptyMovieClip('squa... 0);
function drawSquare() {
x = _root._xmouse;
y = _root._ymouse;
with (_root.square) {
//clear();
moveTo(x-30, y-30);
beginFill(0x000088);
lineTo(x+30, y-30);
lineTo(x+30, y+30);
lineTo(x-30, y+30);
endFill();
}
}
this.setMask(_root.square);
}
onClipEvent (mouseMove) {
drawSquare();
updateAfterEvent();
}thats it....one frame.
see what happens when you un-comment the "clear();" line
- F_180
check your mail
- redFridge0
OCT 9th by the way. thanks again
- F_180
sure thing man.
thanx for the shout out.