Mask Help
can someone please point me to a tutorial teaching the basics of masking? all i find are advanced and i need to know the basic how to's before i get to the advanced stuff. thanks in advance.
FlashKit > Flash Help > Flash Newbies
Posted on: 05-02-2002, 09:04 PM
View Complete Forum Thread with Replies
Sponsored Links:
AS3: Mask Within A Mask (or How To Use A Shape With A Hole In It As A Mask)
Hi guys,
I've been stuck on this AS 3 masking problem for days now. I'm sure there's a simple solution to my problem but it's proving to be a pain.
I have a movieclip that contains some drawings, bitmap, etc. on top of that I am drawing a yellow rectangle with a hole in it using ActionScript:
What I want to achieve is to mask the movieclip container using the yellow rectangle, but I want the hole in the middle to not show the drawings and line:
However what I am actually getting is the yellow rectangle is masking the movieclip, but is ignoring the hole within it:
This is the AS3 code that I've written to get the above effect (with 'maskee' being the movieclip that contains the drawings):
Code:
function drawRectMask(p_sprite:Sprite) : void {
p_sprite.graphics.beginFill(0xf0ff00);
p_sprite.graphics.drawRect(100,100,300, 300);
p_sprite.graphics.moveTo(100,200);
p_sprite.graphics.drawRect(150,150,100, 100);
p_sprite.graphics.endFill();
}
var spr:Sprite = new Sprite();
drawRectMask(spr);
addChild(spr);
maskee.mask = spr ;
I'm at wits end. Any help on this would be greatly appreciated.
View Replies !
View Related
How To Mask Duplicated Movie Clips With A Single Mask?
I have created 11 movie clips 17px in a vertical column.
I have used this code to duplicate them.
ActionScript Code:
for(i=0; i <10; i++){
newName = "softwareBar" + i;
duplicateMovieClip("softwareBar", newName, i);
softwareBar._y += 17;
}
I have a mask that I need to use to cover all the clips, however when I use setmask it only covers the last looped item in the duplicateMovieClip code.
How would I go about masking all the duplicated clips with a single mask?
Not sure if this info is pertinent but once they are masked I will then be animating each duplicated bar separate using this function.
ActionScript Code:
loadBar = function(clipName, amount){
clipName.onEnterFrame = function(){
if(clipName._width<amount){
clipName._width +=speed * speedDim;
}
}
}
Thanks
DDC
View Replies !
View Related
INVERSED Mask? REVERSE Mask?
Okay, here's my dilemma.
I want a small circle to grow to reveal the contents within the circle, and THEN (and this is the hard part) I want another circle to grow from the same starting point that makes shows THROUGH to what's behind the circle.
So
I already have the first part done, where there's the contents on one layer, and a masked circle that tweens to reveal the contents.
BUT, the second part has to reveal the INVERSE of the contents... I don't really know HOW to explain this other than saying I want to punch a hole THROUGH the contents.
Any ideas?
View Replies !
View Related
HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,
I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.
Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.
I have attached the fla file. You'll see what I mean.
Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)
Blastbum
View Replies !
View Related
HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,
I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.
Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.
I have attached the fla file. You'll see what I mean.
Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)
Blastbum
View Replies !
View Related
Dynamic Mask Doesn't Mask...
I have a local radar image that I am loading into a holder movie clip and trying to mask but it doesn't work. Both the image and the mask are being displayed.
The holder movie clip is 'dopplerRad_mc' and I am attaching from the library.
The clip the image is loaded into is 'dopplerHolder_mc' and is dynamically created.
I then attach a mask movie clip from the library, 'imageMask1'.
My code is below. Any idea what I am missing?
var dopplerRad_mc:MovieClip = attachMovie("doppler_mc","dopplerRad_mc", getNextHighestDepth());
var doppler_mc:MovieClip = dopplerRad_mc.createEmptyMovieClip("dopplerHolder_ mc", dopplerRad_mc.getNextHighestDepth());
var mclListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mcLoader.loadClip(doppler, dopplerRad_mc.dopplerHolder_mc,1);
dopplerRad_mc.attachMovie("imageMask","imageMask1" ,2);
dopplerRad_mc.dopplerHolder_mc.setMask(dopplerRad_ mc.imageMask1);
View Replies !
View Related
Attaching Mask Onto Mask Layer
Hi,
I've been trying to attach a movieclip from the library, to the Mask layer using actionscript so that the mask_mc can hide a line of text as it moves.
But the movieclip is not getting attached to the mask layer.
Please help....
View Replies !
View Related
Gradient Mask Using JPEG As Mask
Hi there. I am trying to find a way to use loaded greyscale JPEGs to form gradient masks in Flash. Basically I want to be able to create an opacity mask just like you do in Illustrator or Photoshop, where it's the darkness of each pixel that determines opacity, rather than the alpha value.
It seems that in Flash the only way to create a gradient mask is to use a mask that has varying alpha values. I suppose that means I could use PNG files to form my mask instead, but I really need to be able to do it with JPEGs.
Perhaps there is a BitmapData filter that can convert shades of grey to degrees of alpha?
Thanks :)
Lara.
View Replies !
View Related
Mask To Reveal Preloader And Mask To Hide Preloader Upon Load.
Hi all, can anyone help me in regard to a mask over a preloader of elements.
Ok I have a preloader all set up, this includes a logo, a notice, i.e please wait loading in progresss, a load bar, and a percentage reading.
All I want is a simple wipe effect using a mask, which is very easy to achieve, I have done so already. But I am unsure in how to hide all the preloader elements, and how to use the wipe to reveal all elements on the stage / timeline. I have the wipe setup using two layers, and decided to place these inside a movie clip and place the movie clip on the timeline. But now I am stuck in what to do next.
As when everything is loaded I want the wipe to hide the preloader and move onto the design aspects.
Does anyone have an idea how to achieve this?
View Replies !
View Related
To Mask Or Not To Mask, That Is The Question
Greetings helpful ones..
I am new to Flash and I need your help with a little project
I need to create an animation of a Car breaking through a brick wall and I am not sure if It is possible to import layers including a mask layer from photoshop into Flash and if so how, or if it is easier to create the mask layer in Flash, not quite sure how to do this either.
The other issue is scaling the image of the car as it will get bigger as it comes out through the wall - ie can I group the mask and image of car together whilst scaling..??
Perhaps you know of a better way to do all this, any help would be much appreciated - What I would really like to have is a 3D effect of the Car skidding round on it's front wheels
Thanks for your time
MN
View Replies !
View Related
A Mask Within A Mask Issues...
I'm trying to do a sweep reveal of one image that is made up of 72 individual squares. It's a diagonal sweep of that entire set of squares simultaneously going from left top to right bottom to reveal an image. So each of 72 squares is doing the same reveal of one large image at the same time.
I've managed to do variations of this idea using shape tweens and creating movie clips and duplicating them. But if I need to change the timing it's more difficult if they are all individual frames. Flash seems to get cranky when I try to mask a symbol and then multiply it and use it as a mask for another image.
Seems like such a simple thing, maybe I'm missing the obvious. I'm somewhat new to flash and not much of a programmer....
View Replies !
View Related
Mask Within A Mask? Not Working For Me...
Hello, I am trying to create a gradient mask within a masked clip. Is this possible? Everytime i try to add the outer mask, they stop working.
here is my gradient mask code:
ActionScript Code:
mNav.bHold.cacheAsBitmap=truemNav.mask.cacheAsBitmap=truemNav.bHold.setMask(mNav.mask);
but when i try to add the outer mask... it s stops working:
ActionScript Code:
mNav.setMask(mMask)
any insight?
Thanks,
Q
View Replies !
View Related
[hitTest/Mask] Can A Mask Hide A HitTest Area?
Hi, the subject pretty much says it all. I have the following code:
ActionScript Code:
volume.onEnterFrame = function() {
if (volume.hitTest(_xmouse, _ymouse, true)) {
_root.nextFrame();
} else {
_root.prevFrame();
}
};
...and here is the link. Move your mouse under the bar and move it up slowly under the the speaker next to the number. See what happens? Keep in mind that the look is still being perfected, I was just wanting to know if there were a way I could fix the problem or do I just have to start thinking of a new look for it? Thanks in advance.
(PS: let me know what you think of the look and layout please)
View Replies !
View Related
MASK...WTF?
Ok...I must be an idiot. (keep it down..)
I am having the most trouble doing masks today. Even a static mask..that does nothing..but "MASK".
Is there a rule about masking over text or somthing?...
I just wanna check to make sure..I'm not missing something here..
1.make a layer..image, picture,..whatever.
2 New layer above layer #1...draw whatever shape I want...make that layer a masked layer correct?...The solid parts on layer 2 will be the "WINDOW/TRASPARENT" part when all is said and done correct?
Well,...get this.....when I am building...it alloks fine...mask looks to be working....when I test...no go..when publish..same thing..no way.
This is the third problem I have had with MASKS....I could get something to fade in under a mask...Now..I can lines ot show through..but not the text that is part of the same image...it all on one graphic symbol. DOES ANYBODY have a clue as to what is happening here??
When I drag the playhead..it all works fine also...WTF??
-whispers-
View Replies !
View Related
Mask
Im trying to use the mask to make a lanter wich u can move... so u can light and see only the area around the mouse... the problem is that after creating the background, the black covering everything and the light circle (which is a symbol) Ineed to drag this circle... but it wont let me! WHY!?
Thanx
View Replies !
View Related
Mask
Im trying to use the mask to make a lanter wich u can move... so u can light and see only the area around the mouse... the problem is that after creating the background, the black covering everything and the light circle (which is a symbol) Ineed to drag this circle... but it wont let me! WHY!?
Thanx
View Replies !
View Related
Mc Mask
hi everybody, first time in flashkit, well i,m having this problem with a mask , i´m trying to mask a moviclip thats inside another mc.
please help.
thanks
View Replies !
View Related
Mask Help
Hi
I am making a simple mask in flash MX. It works fine when I use the control buttons to play it all is fine and it works fine. but if I publish it or use the test scene or test movie it does not work.
Whats up?
Thanxs Mark
View Replies !
View Related
Mask
Is there a way to dynamically create a mask layer, what goes inside that layer and what it is masking?
Say, a button is hit, and a mask layer is created with a movie clip in that layer (the movie clip has a rectangle in it), and it is masking an image. So it would be slowly revealing the image beneath it.
is this possible? if not, what may be the best way to try to achieve this same effect?
any help would be much appreciated.
thanks
ty
View Replies !
View Related
Can Some Tell How This Mask Done?
http://www.baxtered.com
The mask that goes from one swf' s over the other. I hope this makes sence.
I really need to get this done.
Can someone tell me how this Mask was made. I think it has to do with the levels the swf 's are on.
Thank you for everything!
View Replies !
View Related
To Mask Or Not To Mask
hello hello...have a small problem maybe someone can help me with. I am using loadmovie to pull in movies that sit on top of a backdrop MC that is located in the parent swf. I have a very small mask set up (just 1 skinny strip bordering the top edge of the backdrop MC) only used to "constrain" the backdrop size when i do a zoom in effect. these movies that i load have tons of dynamic textfields, comboboxes, and other places in which i would need to embed fonts due to this little tiny mask. My file sizes are growing tremendously because of this, and i haven't even done a good deal of what i'm planning on doing, not to mention the fact that this is tedious and annoying to do for every field. I was wondering if at least 1 of 2 things are possible: (i'm pretty sure the answer to this first one is no, but i'll ask anyway) - is there anyway to globally embed a font so multiple fields can access it and you don't have to embed each one?
or: are there any alternatives that will get a masking effect that i need, without actually using a real mask, so i can avoid all of this crap? i don't care about the other 3 sides, because they just get cut off by flash, but i don't want the backdrop expanding into my nav area across the top when i zoom.
Thanks so much for advice for either direction!
View Replies !
View Related
Mask
does anyone know of a way to import a transparent image in flash and use it as a mask? when i try it, the image mask is a square the size of the full image. this is probably a vector vs. bitmap limitation, but has anyone figured out a way around it? i need to mask out a pretty intricate shape that i can't draw in flash.
thanks
View Replies !
View Related
Mask Bug?
This may or may not be a bug in flash MX. When you create a mask and use the line tool in there, the lines you drew do not work.(as part of the mask) This is also the case if you use the line tool in a graphic and try to use the graphic in a mask. Does anybody know how to get that to work? Thanks in advance.
View Replies !
View Related
To Mask Or Not To Mask?
Peace,
There is an effect found at http://www.iriejamfm.com Once you enter the site, the effect that I am talking about is located underneath the flash buttons that say shopping, events, gallery, etc on the top right. It is the effect that can be seen on the words that say iriejamfm.com/blackemperorent.com I thought it might have been a masking effect, someone else told me it’s more a graphic with the appearance of a shine dim to like 75% which gives the appearance of hitting each letter, but it’s alpha it’s set transparent. I was lossed after he said that, but my interest has indeed peeked, cause I really like the effect and I am trying to duplicate it for a site I am doing. Any thoughts, ideas, and help would be greatly appreciated.
Thanks in Advance
Bonafide
View Replies !
View Related
Mask Help
I have a mask in place over a masked layer that contains a text field which has text from an external .txt file imported into it via a corresponding variable name. I've noticed that when a mask is masking a layer bringing in external text like that, the external text is not visible.
is there anyway to get around this so i can have a masked layer that can display visible external text?
supercook
View Replies !
View Related
Help Should I Use A Mask?
Hello. I am trying to make this calendar look right for the loading window. http://lupostudio.com/loadingcalender5.html
Notice how the days don't change until after the pages folds up. Is there a way I can get the days to change by the month as the page folds up? Can I use a masking technique? HELP PLEASE!!!
Thank you.
View Replies !
View Related
How To Do This Mask
Okay, i admittedly suck at masking, except for very simple masking..
This effect i'm looking to do may be simple, but i need some help anyway..
here's the site: http://www.bsfllp.com/htm/flash.htm
I can already script the movement, but how do you do the mask effect during transition?
thanks,
-myk
View Replies !
View Related
Using A Mask In MX
Greetings!
I am working with a file that uses a Mask. When I lock the appropriate layers, and hit the return key, the animation plays just fine. If I use "Control, Play Movie", the effect does not show, nor does it show when I export the file.
Being a total newbie, I don't know what to look for as far as troubleshooting.
The effect I am trying to get is text on a "wave". I used a tutorial here on FlashKit as an example, but apparently, I missed something.
Suggestions?
TIA!
View Replies !
View Related
How Do You Mask A MC?
Hey,
I got a MC of a matrix fade I want to put a mask on it, so it only plays within a certin box I got... I can't mask it, it won't play at all when I put a mask on the layer that contains the MC with the matrix fade in it...
What do I gotta do to mask it?
View Replies !
View Related
Mask
Hello,
i have a black rectangle and a white text.
i made a script which changes the _xscale of the square to make it bigger and going over the text.
what i want is to make the text visible when the rectangle is over it. So it's like, making the rectangle a mask of the text and being able to change the size of the rectangle.
i have the script what scales the rectangle but i don't know how to make it a mask to the text...probably it should be a script mask.
Thanks, Miguel
View Replies !
View Related
How To Mask The Way I Want To..
let's say i have a picture on my stage... i would mask a layer on top of it and draw a circle in the center... what happens is that the circle is the place where the movie can be seen...
what if i wan to mask the center, and allow myself to view the movie clip part around the circle? thanks.
View Replies !
View Related
Mask This
Hey I was just checking out: http://www.teamsleep.net/
I really like those circle masks that happens right when you go to the website. Anyone know how to do this?
I'm lookin for something that won't bog down my site.
Thanks
(Flash MX, Win XP)
View Replies !
View Related
Mask Help
I have a simple Mask FLA which uses a cirlce mask to tween across a word revealing the letters. It works FINE when I PLAY the FLA in Flash MX. However, when I choose test the movie, nothing appears on the screen. There is no animation. Nothing! Just a blank white screen. Clicking on the saved SWF is the same. Nothing! Can someone please help me before I pull my hair out!
Thnaks,
Michael
View Replies !
View Related
Mc Mask
Hi All
Can anyone tell me how to rectify the following problem?
I have a mc which has an elastic effect when the mouse is over it. But when I use the mc as a mask it does not work. Can anyone shed any kind of light.
Please see attached .fla
Your help is appreciated
View Replies !
View Related
Mask
I am trying to produce a scratch card in flash but having troubles.
All I want the movie to do is when the mouse is moved over a section of the scratch card the picture underneath revelas it self.
Any help would be grand!
Jemes
View Replies !
View Related
Help With Mask
Hi,
Well I want to know how do I make a shape goins in a certain motion and draws and leaves tracks behind him , an example on This site well see how that circle draws "Hanik2" , yea I wanna know how to do that , I know how to do masks and everything but that one got me a little confusing
View Replies !
View Related
Mask Help Please
The attathed file outlines what im trying to achieve.
When you first click on the buttons on the left the mask effect works ok, but after that it keeps flicking back to the original image before it masks into the new one.
All I am trying to achieve is to simply have the images mask in and out when you click the buttons.
View Replies !
View Related
Mask:AS?
hey
its 3am and im kinda brain dead but i was wondering if its possible to have a mask contain an action script...
what i need done is have several boxes fade in and out while theyre a mask, however i choose not to animate them because i need the to be random so ive scripted that much... and they work fine without the mask but when i mask the object the AS wont work... ive also tried putting a "setMask" on the object but i get the same result as making it a mask...
thanks
-Cody
View Replies !
View Related
Can't Mask
Why is this happening???
What I'm trying to do here is simply make the text glow purple.
On the stage it seems to work, but when I preview it, it shows the fill...crappy!
View Replies !
View Related
Me And My Big Mask
Hi ya
Hope someone can help. I created a masking effect on the maintimeline but I need to move it into a mc. It all works fine its just the mask mc doesnt mask...everything is okay. Not matter what I have tried I just cant get it to work....any suggestions would be grateful
code:
_root.imageAni.attachMovie("picMc", "picMask", 1200);
picMask._x = 217.5;
picMask._y = 147.5;
_root.imageAni.attachMovie("picMc", "picBg", 500);
picBg._x = 217.5;
picBg._y = 147.5;
_root.imageAni.attachMovie("maskMC", "myMask", 2000);
myMask._x = 217.5;
myMask._y = 147.5;
_root.imageAni.attachMovie("bgMask", "bgMask", 1500);
bgMask._x = 217.5;
bgMask._y = 147.5;
picMask.setMask("myMask");
picBg.setMask("bgMask");
picLocArr = [217, -225, -666.5];
onEnterFrame = function () {
if (picPlay != false) {
// trace(Math.abs(picLocArr[selectPicNum-1]-picMask._x));
picMask._x += (picLocArr[selectPicNum-1]-picMask._x)/5;
picBg._x += (picLocArr[selectPicNum-1]-picBg._x)/4.5;
if (Math.abs(picLocArr[selectPicNum-1]-picMask._x)<0.2) {
picMask._x = picLocArr[selectPicNum-1];
picPlay = false;
}
}
};
var selectPicNum = 1;
var selectedPicNum = 1;
var picPlay = false;
contour.swapDepths(5000);
View Replies !
View Related
|