Copy link to clipboard
Copied
I am trying to mask a movieclip. But mask (shape of rectangle) is displayed over the content instead of masking the content in flash as3.
Please anyone help me...
Copy link to clipboard
Copied
Hi,
Please try this, it is working perfectly.
import flash.events.Event;
//mc is the instance of stage movieClip which has to be shown.
//myMask is instance of movieclip in which region movieClip mc is to be shown.
mc.mask = myMask;
mc.addEventListener(Event.ENTER_FRAME, onEnter);
//Keep movieClip mc at initial postion and myMask in center of the stage.
function onEnter(e:Event):void
{
mc.x += 10;
}
Regards,
Vipul
Copy link to clipboard
Copied
Thaks for your reply
It is also working but my problem is different. Luckily with the help of my senior, I got the solution.
Copy link to clipboard
Copied
Hi,
It is good tht you gotthe solution, you stated that problem is something else, please share the problem so that i can also be aware about that.
Regards,
Vipul
Copy link to clipboard
Copied
Hi Vipul,
Its good to ask about the problem and solution. I will explain you in detail what the problem is and how I solved it.
Actually my problem is I was trying to load data from URL and add the loaded data to a movieclip (I assumed this movieclip as appsHolder). I want to add Scrolling for this one. For that I created one class with masking, scrolling functionalities. In that class I created one movieclip called holder and add the previous appsHolder to holder by calling a funtion. Here I applied masking to holder. and also every time the data is loading, I create one new appsHolder. As I mentioned above I got a problem in masking.
I am trying to analyse my mistake and found that every time creating a new appsHolder generates a problem. Immediatley I removed that code and create appsHolder only once.
And also I want to mention another thing, masking applied for either holder or appsHolder doesn't represents difference.
I don't know whether it is logical or not. But finally the problem is solved.