-
1. Re: Reverse mask
Preran Aug 21, 2014 5:48 AM (in response to rahex)Hi rahex,
Can you check the solution in this discussion and let us know if it helped? Flash inverted mask - Stack Overflow
Thanks,
Preran
-
2. Re: Reverse mask
rahex Aug 21, 2014 12:07 PM (in response to Preran)Thank you very much Preran,
the solution provided under that link is working in general.
But is there a reliable way to make two movie clips which are inside different movie clips move together?
I have the object, which is moving with an action script tween along the stage, x value.
And I need to make the mask to move the same. I can make a tween as well, but the x value is a bit difficult. As I do not want it to be a fixed value, but in relation to the stage and the object movie clip it should move together with.
I got it working, but its not 100% reliable.
Is there a way like one movie clip following the movement of other movie clip?
At the moment I have the following code, but I'm not completely happy with how the x value is defined for the mask tween.
function moveGirlAwayFromStage(event: MouseEvent): void
{
awayTweenGirl = new Tween(TudrukRongagaSiputab, "x", Regular.easeIn, 0, -stage.stageWidth / 2 - TudrukRongagaSiputab.width / 2, 15, true);
awayTweenWaterMask = new Tween(Vesi.VeePiir.VeePiirMask, "x", Regular.easeIn, 0, -stage.stageWidth / 2 + 25, 15, true);
awayTweenGirl.addEventListener(TweenEvent.MOTION_FINISH, moveGirlBackToStage);
}
function moveGirlBackToStage(event: TweenEvent): void
{
TudrukRongagaSiputab.x = stage.stageWidth + TudrukRongagaSiputab.width / 2;
Vesi.VeePiir.VeePiirMask.x = stage.stageWidth / 1.3;
backTweenGirl = new Tween(TudrukRongagaSiputab, "x", Regular.easeOut, TudrukRongagaSiputab.x, 0, 15, true)
backTweenWaterMask = new Tween(Vesi.VeePiir.VeePiirMask, "x", Regular.easeOut, Vesi.VeePiir.VeePiirMask.x, 0, 15, true);
}
I there a better way?


