ActionScript 3.0 :: Possible To Mask Multiple MC Or Sprites Under One Mask?
Nov 26, 2009I was wondering if its possible to mask multiple MC or Sprites under one mask, when using AS3.abc.mask = a;cba.mask = a;something like that
View 2 RepliesI was wondering if its possible to mask multiple MC or Sprites under one mask, when using AS3.abc.mask = a;cba.mask = a;something like that
View 2 Repliesim trying to use a mask on multiple sprites:[code]But the mask seems only to affect the last object, that i added to mask (righttxt). Is there a way to use the same mask for multiple sprites?
View 1 RepliesI have a startDrag function set up on a loader and mask that when the mouse is down on the loader it drags, when not it doesn't. There is also 2 buttons that control whether mask1 or mask2 is used. What i would like however is when the mouse is down - the area of the loader outside of the mask is visible but only by about 10/20% alpha, that way the user can see where all the image is while dragging. Is this possible? Full code can be seen below and i have attached the zip with the .fla file:
[Code]...
what i am doing is to make something along the lines of the "scriptable mask" tutorial Inigo was kind enough to put up.My idea is to have a large mask behind the whole of my flash site, this masks a colour image with a black & white one (nothing tricky). The image I am using is actually 5 separate images combined, and each is a pic of certain parts of the site.I also have a very basic set of buttons along the bottom... each corresponding to each section.
All I want is to set it up so that when I mouse over the buttons, the _x of the mask moves to correspond with the correct image... really very basic... or so I thought .If anything it should be easier to do than what is in Inigo's tut (where he uses the _x of the mouse to move the mask)... i just cant seem to get it to work with a nice easing effect (its easy to get the mask to simply snap to each coordinate, but I need it to smoothly move).
maybe point me towards a better way to mask. png file is way too big. I have been using the mask layer option to create my own mask around a jpg image by drawing around it on the mask layer. There has to be a fetter and faster way to do this. Is it possible to maybe have a specific color range have an alpha value of 0. Similar to green screening whereas If I put the item I want to clip on a green background flash will auto take out the green for me. and by auto I mean action script maybe. I think this can be done but im not finding it.
how are these guys clipping these images [URL] they have the movie clips set up where the black background on the 3 layers of shoes is getting masked out. When I go into the shoe movie clips I see there is a black background but it just disappears when I go back to main timeline.
ive gotten one movie clip to mask another in the actions frame but i cant seem to be able to mask the flames which are a shape with a movieclip in this as file. im not getting any errors but the mask isnt covering anything look near the bottom at s.mask=mask_mc; there are about 20 "s" shapes spawning per second if that has anything to do with it
Code:
//this package turns an mc into a flaming button that calls a javascript function
package
{
import flash.display.MovieClip;
[Code].....
I have a mask and I want to take 12 images and put the same mask to it and then loop them.I can apply the mask to one image but would this be easier to do in actionscript or am I completely off base here?
View 21 RepliesI'm trying to mask multiple shape tweens for a slideshow animation I'm working on. (the transition would look just like the main animation on this page url...)
Everything works fine when I'm only masking/tweening one shape. But as soon as I add a few more dquares to the mix everything goes to hell. Can someone tell me the most efficient way to have multiple shapes tweening, while masking an image underneath them?
is there a way to apply the mask to multiple objects in as3.0 ? one i try to do it using the .mask = it can only effect one object at a time ...
View 2 RepliesI have two MovieClips onscreen, and I want to apply the same mask to both. I set the the masks using
mc1.mask = mymask;
mc2.mask = mymask;
Only mc2 receives the mask. How can I set the same mask for two different MovieClips without having to resort to putting them both in a single MovieClip?
can I mask multiple object through a loop
should be the question
ActionScript Code:
for (var m = 0; m < mylooper; m++ ) {
MovieClip(holdbox.getChildByName("mytxt" + [m] )).mask = mymask
}
it seems to only mask the last object not all of them
i'm trying to add movieclips to a single mask. but i cant seem to get it to work.
is there a easy way to do this? or do i have to remove the mask-child and add a new one again?
I am using Flash MX2004(AS 2.0), I need to mask the attached movieclip, totally I attached 3 movieclip (all are same one), I need to display first movieclip by using mask. One more thing is moving that mask by press button, when I press the button the mask will show the second movie clip and so on.
This is my code: I have to mask box1_mc
function cardcolor() {
var color:Color = new Color(_root["box_mc1"+i].box1_mc);
var t:Number = 0x00FF00;
_root["box_mc1"+i].onPress = function():Void {
[Code] .....
I am doing a multiple mask where an image is being masked by multiple little squares that drop down.I created 2 layers, mask and masked for each square and image.That part works fine, however, I wanted to load a different image everytime when the page loads, I used the example on this site:
choice = Math.round(Math.random()*6);
switch (choice) {
case 0 :[code]...
Now, every little square load a random image instead of all loading the same image. Is it possible to ask all other masked layer to call on that one random image? What should I do?
I have a logo that I'd like to animate for a class presentation. The logo can be seen here: [URL]. I would like only the word LEAF to fade in, and then the blue portion to wind its way around (Starting at the gap at the top, going clockwise and finishing by revealing to two shorter lines in the center). At first I tried to mask the blue portion in segments, but couldn't figure out how to link multiple symbols together to mask the same image.
View 1 RepliesI have make many thumbnails(t1,t2,t3....) on homepage of my website now i req. to mask all thmbnails by one movieclip(mskMC)
View 2 Repliesi am trying to mask 3 thumbnails from 1 movieclips
mc.samsungchamp.mask=mc.msk
mc.samsungduos.mask=mc.msk
mc.samsungace.mask=mc.msk
but these thumbs are is not showing masked.
I am writing an application that looks into an XML file and pulls out the images within. I would like to pull out the raw images and apply a mask to them dynamically.As you can see below i create a blank movie clip and put the images into it.. At this point i want to create the mask.
var thumbLdr:Loader = new Loader();
var thumbURLReq:URLRequest = new URLRequest(galleryDir + thumb);
thumbLdr.load(thumbURLReq);
[code].....
I am attaching six movies via the attachMovie method. I have put all six of these instances into an array and everything's going smoothly as all box's move around in random places and bounce around around a little. Only problem is I want to mask all 6 of these instances via setMask so they are restricted to one area but can't seem to figure out how to do that.If that's not possible I would also love to know if there is a way to do collision testing with them and then I could draw a border around the area I want them to stay in and have them bounce around that (I would actually prefer this)
View 1 RepliesI want to apply multiple mask in a single movieclip?? how do i do that i tried doesnt work with action script?
View 4 RepliesI have a series of images I'm adding to stage from the library. I need them in separate movie clips for tweening. If I create a new layer... add a shape to the layer... mask the layer... finally, add a layer below that layer (with nothing on it) then all of the images I've added from the library are masked. No matter what I try with code however, I can only get one image to be masked. must you create a new mask for each image you would like to mask? I thought maybe if I could do it all in one go on a layer, there must be some code that allows one shape/mc/object to mask several clips.
View 3 RepliesI'm having a really strange problem with movieclips that use a mask for reflection. On my main timeline I'm creating two instances of a movieclip named 'item'. In item.as I'm setting buttonmode and cacheAsBitmap to true, then setting a gradient movieclip as a mask. When I run the movie I am only getting the clickable hand icon when I hover over the first clip. However, if I comment out 'this.mask = mask_mc' then both clips are selectable.
Main Timeline
Code:
Select allvar item_mc = new item();
item_mc.x = 0;
item_mc.y = 100;
addChild(item_mc);
var item_mc2 = new item();
[Code] .....
I've searched every possible actionscript forum for this and i cant seem to find it. How can i create an "area" of blur which blurs everything beneath it?Like some kind of masked blur effekt?
View 0 RepliesAS3 Movie clip does not have .setMask() method, but it has .mask property. What is the syntax to set a mask on movie clip A (mcA) using movie clip B (mcB) mith .mask parameter in AS3?
mcA.setMask(mcB); // does not work in AS3 (no setMask() method any more)
mcA.mask = mcB; //does not do the job either
Is this possible? Cause it "masks" just one shape within the mask layer.
View 7 RepliesI received an swf movie of a rotating brick with a blue background. I converted to fla but the blue bg and the brick are considered a single object. Is there a way to mask the bg without having to export it as single frames and masking in ps?
View 1 RepliesI'm trying to use an irregularly shaped PNG as a mask but the mask is just coming out as a straight rectangle, not taking into account the transperancy of the image.
I've found many people complainng about this across the internet, and it is apperantly solvable, I just haven't been able to figure it out.
I've tried Trace Bitmap to vectorize the shape, since it's a single solid shape, but I'm getting weird results: [URL] I cant figure out why those lines are appearing across my mask. There's nothing there in the actual traced image, I've even ran the eraser over the affected sections to make sure.
1- is there a way to make use of any universal URL in flash ? i mean. not needing to have the full path of the target in the button since the target is in the same folder than the page where is the flash ?
2- now, thats a funny one, i can make mask to make thing appear in an animation fashion style, no probleme as with any Adobe program... however unlike all other Adobe programs, it seem i am unable to find HOW make the exact reversed result... I want to make thing disappear without using the alpha channel, because i want to make it in an animation style way. It is to use for a sub-menu, where when you click the button to open the sub-menu, you see it appear nicely and in an animated way. But when you click again the button to close it, or once you picked your choice, it close the sub-menu in the exact reverse way it was open...
I'm trying to make the image just scroll in with the current mask effect and not scroll out. You can download the source file here: [URL]. The layer to look at is "FlashAICB" there is 2 portions of code, one on the movie clip on this time line, and other on the mask inside the movie clip.
View 3 Replieswhy my masking effect is not working,i mean on Library display is displaying correctly[Type:Movie],i just did draged into main pannel the movie clip,and when i run it,it just show static text,why?
View 13 Replies