Actionscript :: Flash - Grayscale And Alpha Mask?

Jul 9, 2011

I would like to make a mask that both converts any colors to grayscale and then reduces their alpha value. The intended purpose is for the masked region to be in grayscale and lighter so that the unmasked region is more prominent. Most tutorials I've seen for alpha value masks are far too complicated and use the Flash GUI. How do you accomplish the same thing in ActionScript?

If the following is my image:

Then a traditional mask over some selection would produce the following:Instead, those parts that are masked out completely, I would like for those to be converted to grayscale:And their alpha value decreased, so they're lightened:

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Converting Grayscale Bitmap To Alpha Bitwise Stuff

Sep 11, 2009

I've written a function that makes all white pixels in an image transparent. This works OK, but the resulting image looks jagged because it only replaces pixels that are solid white. What I'd really like to do is set the alpha value for each pixel proportional to the amount of white in that pixel, then set the RGB value to #000000. I think this would produce a very smooth semi-transparent image. However, I'm not very good at bitwise operations. Can any of you lend a hand?

As an added bonus I'd like to overlay the resulting bitmap on top of another image. I know this is possible via other means, but it would be nice to do it all in one function for performance reasons and simplicity.

[Code]...

View 7 Replies

ActionScript 3.0 :: Alpha Mask - Area Of The Loader Outside Of The Mask Will Visible When The Mouse Is Down

Sep 10, 2010

I 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]...

View 2 Replies

ActionScript 3.0 :: Creating Alpha Mask MC?

Jan 28, 2009

I am running into trouble getting an alpha mask to work correctly in AS3. The mask itself seems to be working on the pixelated movieclip, but the alpha channel isn't appearing at all.

View 4 Replies

Alpha Mask Doesn't Work

Aug 19, 2009

I've used this code to apply a gradient alpha mask: bg_mc.cacheAsBitmap=true;mask_mc.cacheAsBitmap=true;bg_mc.setMask(mask_mc); Then I applied a motion tween to the mask_mc clip. But the motion tween doesn't happen? It only shows the first frame of the motion tween. It does apply the alpha mask though. Why doesn't it show the rest of the motion tween.

View 9 Replies

ActionScript 2.0 :: Alpha Mask Not Working?

Aug 19, 2009

I've tried to make an alpha mask using a photo and a mask containing a alpha gradient. Using this code:

ActionScript Code:
maskee.cacheAsBitmap = true;
maskMC.cacheAsBitmap = true;
maskee.setMask("maskMC");

But it's not working? The 'blob' mask in the center should motion tween bigger. I can see the alpha mask in action, but the motion tween doesn't do anything. The image is freezing.

View 6 Replies

ActionScript 2.0 :: Gray Scale To Alpha Mask?

Jul 18, 2006

Is there anyway to create an alpha mask out of a grayscale image in flash?i am using the color adjust filter to create a bleached out kind of image. I would like to make the white transparent.

View 1 Replies

ActionScript 3.0 :: Moment Of Brainfreeze - BitmapData With A Alpha Mask?

Mar 15, 2011

If my title ain't clear enough, I've got two bitmapData sheets with an image, one being the actual image, and the other image having the same structure, but all areas being visible are black, and all transparent areas being completely white. So far I've been playing around with:

[Code]....

View 5 Replies

ActionScript 2.0 :: Change The Image Color From RGB To Grayscale In Flash Mx 2004?

May 9, 2005

can i change the image color from RGB to Grayscale in flash mx 2004 with Action script

View 5 Replies

ActionScript 2.0 :: Scriptable Mask - Large Mask Behind The Whole Of Flash Site?

Aug 19, 2003

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).

View 4 Replies

Making Vector Graphic Grayscale?

Oct 5, 2009

I have a image of a cartoon (it is vector graphic created in Flash not bitmap!) and I want to change it
into grayscale, how do I do that?

View 2 Replies

ActionScript 3.0 :: Color Transform To Grayscale

Jun 11, 2009

1. Is there a function in AS3 player 9 or 10 to greyscale a Loader.load()ed jpg image? I don't even think it is feasible to manually calculate the greyscale values for each pixel. If there is no such function like photoshop does, then the other option is to have 2 images - one colored and the other greyscale - to switch between each other on mouseover. Am I right, or what else?

2. Why is it that the barbarabarry dot com images doesn't get downloaded into temporary internet files folder? I am using Loader.load to get the images loaded into flash. As a side effect, I noticed that these images gets downloaded into the temporary internet files folder (Internet Explorer). Not that it's bad, but I am curious how barbarabarry images do not get downloaded. I noticed this while trying to confirm whether the grey scale is dynamic or just 2 different images.

View 9 Replies

ActionScript 3.0 :: Convert A Color Bitmap To Grayscale Using It?

Aug 18, 2009

How can i convert a color bitmap to grayscale using as3?

View 1 Replies

ActionScript 2.0 :: ColorTransformTo - Changing Image To Grayscale

Feb 20, 2007

Trying to use colorTransformTo to turn a dynamically loaded to grayscale and then back again. The rgb values are 185, 185, 185.

View 4 Replies

ActionScript 2.0 :: Convert Color Photo To Grayscale?

May 19, 2004

I have been exploring setTransform () and setRGB looking for a way to convert a color .jpg into grayscale. Even triyed using functions to define a Saturation control like the one in [URL]

View 6 Replies

ActionScript 2.0 :: Dynamic Random Grayscale Easing?

Mar 14, 2007

I'm dying here. I'm making an interactive image that's grayscale. Whenever the _parent MC is clicked, the different elements of the image randomly shift in grayscale.I have patchworked a thing together that works, but the code is so clunky that it basically kills the machine. I've tried several different color methods with varying success (can't even get colorTransform to work). how to build a function or something else that can basically shift the color to a randomly generated "target" value over n number of frames?

Code snippet:

Code:
imageHolder.onRelease = function() {
grass_color = new Color(imageHolder.grass);
oldColor = grass_color.getTransform();
//gets previous color value

[code]....

One of my big issues has been trying to create a function that can be applied to several different objects, or generate the objects for each mc. There are 5 color objects that color shift. This has been driving me nuts for days.

View 1 Replies

ActionScript 2.0 :: Change The Image Color From RGB To Grayscale?

May 9, 2005

can i change the image color from RGB to Grayscale in flash mx 2004 with Action script

View 5 Replies

ActionScript 3.0 :: Manipulate Saturation / Make Movieclip Grayscale?

Aug 20, 2009

in the filters panel, there is an "adjust color" option.. and inside of it, there is an option there for "saturation".. setting it to the lowest (-100) will turn the movieclip / whatever object you're applying the filter to, to grayscale..i was wondering, how would i go about this using code?

for example, if there was a movieclip on stage called "thePic" and i wanted to decrease its saturation slowly every enterframe until it finally becomes grayscale, how would i go about it?i know how to manipulate the other filters like GlowFilter and BlurFilter through code, but it seems like there is no "AdjustColorFilter".. there is a ColorMatrixFilter, but i dont event understand how it works..

View 2 Replies

ActionScript 3.0 :: Setting The Alpha Of MovieClip With Objects Changes The Alpha Separately For Each Object

Oct 23, 2010

[URL] i want the object to fade out but in the object there's a lot of overlapping pictures and each becomes half transparent. how to make the movieclip to change the alpha as it was without objects?

[Code]....

View 2 Replies

ActionScript 3.0 :: Curious Tip: Flipping Sprite.alpha=0 To Alpha=1 Back And Forth With No Logic?

Dec 15, 2011

just spotted this curious trick. If you want to flip something to go invisible on a click, and then reappear on another click (etc etc), try this:

create the sprite, setting alpha to either to 1 OR -1
mySprite.alpha=1; //OR
mySprite.aplha=-1;

[code]....

View 9 Replies

ActionScript 2.0 :: Loading A Movie A Solid Shape Is There With Alpha At 100% Then Over A Period Of 5 Secs Its Alpha Is Reduced To 0?

Jun 27, 2003

using AS, on loading a movie a solid shape is there with alpha at 100% then over a period of 5 secs its alpha is reduced to 0.

i'm new to this......please help if you want to if you don't have a good weekend but think of me struggling onwards and upwards...

View 14 Replies

Create Own Mask Around A Jpg Image By Drawing Around It On The Mask Layer

Dec 4, 2009

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.

View 3 Replies

ActionScript 3.0 :: Shape.mask=mc.mask In As File Not Working

Apr 8, 2010

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].....

View 3 Replies

ActionScript 3.0 :: Possible To Mask Multiple MC Or Sprites Under One Mask?

Nov 26, 2009

I 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 Replies

Set Alpha For Whole Stage Down But Have 1 Mc Full Alpha?

Aug 2, 2011

I want to do aplpha = .5 for the whole app, but then have a MC display at full alpha, is there any way to do this?

View 6 Replies

Opacity Mask In Flash?

Oct 15, 2009

is there such a thing as an opacity mask in flash?  (like the one in illustrator--or something similar?)

View 5 Replies

Flash :: Invert A Mask In It?

Feb 9, 2010

I've been looking for a simple way to invert a mask in flash. Its just amazing how it doesn't have this feature.

I just really need to paint shape and whatever is below (in layers) wont show up.

View 1 Replies

IDE :: Importing Flv / Alpha Into Flash

Feb 5, 2009

i need to import a flv into flash project. i have encoded the flv in adobe media encoder, with alpha channel checked, but when i import it, it is not at all transparent.the .mov from which it was encoded is 100% transparent.

View 1 Replies

IDE :: Gradine Mask In Flash?

Jun 16, 2009

I need to make a mask, like in photoshop for example, with gray tones which provide particular transparency.I thing that I've seen something like this in the past, so obviously it is possible.

View 2 Replies

Professional :: Mask On Flv File In Flash Cs4?

Jun 2, 2010

I saw one video on how to use flv file in flash and mask it. It is working fine when I am using the following option while importing a video file to flash:
 
Load external video with playback component
 
But when I tried with the following option it doesn't show the background, it shows only movie which is playing nicely. But not the background which has a bill board.Embed FLV in SWF and play in timeline.It seems the mask is not working with this option.Actually it should be like the above.But when I am using the option Embed FLV in SWF and play in timeline while importing the flv video, getting the result like below: It is not showing the Bill board as above.See the layers created:

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved