Mask problem

I have created a drag and drop game, where the user has to drag objects that dont belong to a certain spot. I have a spotlight cursor that acts as a torch were they have to find the objects, the only problem is when they drag the objects down to the spot there not on show cos u can only see them with the masked cursor.

This has been bugging me for a while. I was trying to put the same mask thats on the cursor over the bar at the bottom so that the user will be able to see the objects theyve dragged down.

This is the code that is used for the spotlight cursor

**myInterval = setInterval(moveMask,50);

function moveMask() {
masker_mc._x = _xmouse;
masker_mc._y = _ymouse;
}

buttons_mc.setMask(masker_mc);

**I want the same mask on another spot that doesnt move with the cursor.
Any help to figure this problem or a way i could go bout fixing it would be great.
Thanks!!

Hi Aidy,

This might not be the best way to solve the problem, but I think it would work fine:

Edit your masker_mc symbol on the stage, and add a shape over the area you would like to show the objects that have been dragged down. Then, convert the other shape that you’re using as a spotlight to an another symbol, call its something like spot_mc. What this does is nest the movie clip that you want to move around inside the total masking move clip, if that makes sense. Then, just change your code in moveMask from “masker_mc” to “masker_mc.spot_mc” - that way only the spot is being moved around by the moveMask function.

-thesean

[quote=Aidy;2325862]I have created a drag and drop game, where the user has to drag objects that dont belong to a certain spot. I have a spotlight cursor that acts as a torch were they have to find the objects, the only problem is when they drag the objects down to the spot there not on show cos u can only see them with the masked cursor.

This has been bugging me for a while. I was trying to put the same mask thats on the cursor over the bar at the bottom so that the user will be able to see the objects theyve dragged down.

This is the code that is used for the spotlight cursor

**myInterval = setInterval(moveMask,50);

function moveMask() {
masker_mc._x = _xmouse;
masker_mc._y = _ymouse;
}

buttons_mc.setMask(masker_mc);

**I want the same mask on another spot that doesnt move with the cursor.
Any help to figure this problem or a way i could go bout fixing it would be great.
Thanks!![/quote]