-
Clipping graphics of child movies
Is there a way to clip the graphics of a child movie? I want to draw a circle that runs over the edge of the movie and I want only the part inside the movie to show up. The actual function is more complicated than this, so please clipping responses only, I will not be able to draw semicircles instead.
-
All I found is to use masks.. sure, clipping rectangle would be faster but I did not found one in flash api.
Or mayby using fixed size bitmap for drawing plane.. (totally untested... )
Last edited by Finjogi; 12-30-2007 at 06:54 AM.
-
Senior Member
The standard method of clipping in Flash is to use a mask. Masks have the disadvantage of extra processing, but have the advantage of extra flexibility. Rendering to a bitmap surface would be as processing intensive as a mask.
Cheers,
kusco
(3DFA Support Team)
-
Ok. Where would the mask go? The samples show how to mask other elements, but I need clipping for this.graphics.drawStuff, with 'this' being a small movie within the main movie. Do I create a mask on the child movie then do mask.graphics.drawStuff?
-
This need help with this one.
-
Draw for example a rectangle to your "small movie" ( using add visual elements-> paint->) Enable it's properties... Then add these lines in movie script(When movie starts script..)
// these 2 lines make a mask to your small movie
var mymask = element ("maski");
this.mask = mymask;
// test that masking is working...
this.graphics.beginFill(0xFF0000);
this.graphics.drawRect(0, 0, 800, 20); // draw very long rect..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|