Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Make Colour Photo Greyscale



Is there a way to make a imported colour picture greyscale?

What I want to do is fade an image in from black and white, then once its faded in make it fade to colour.

Or do I have to have 2 versions of the same image?

Thanks for the help
simon



FlashKit > Flash Help > Flash General Help
Posted on: 02-14-2004, 07:26 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Greyscale To Colour Actionscript Help
After scowering the net for quite sometime I've managed to come up with a way to convert an image from greyscale to colour in actionscript.


Code:
import flash.filters.ColorMatrixFilter;
var nocolour:Array = [0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0];
var colour:Array = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];
var greyscale:ColorMatrixFilter = new ColorMatrixFilter(nocolour);
var fullcolour:ColorMatrixFilter = new ColorMatrixFilter(colour);

target_mc.filters = [greyscale];

target_mc.onRollOver = function() {
this.onEnterFrame = function () {
this.filters = [fullcolour];
}
};
target_mc.onRollOut = function() {
this.onEnterFrame = function () {
this.filters = [greyscale];
}
};
The above code is basically setting the target_mc movieclip to greyscale by default, and then when you RollOver it changes to full colour, again RollOut changes back to greyscale.

My question for the guru's is, how would you go about fading the transition, instead of it being just a straight jump?

Greyscale To Colour Actionscript Example
After scowering the net for quite sometime I've managed to come up with a way to convert an image from greyscale to colour in actionscript.


Code:
import flash.filters.ColorMatrixFilter;
var nocolour:Array = [0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0];
var colour:Array = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];
var greyscale:ColorMatrixFilter = new ColorMatrixFilter(nocolour);
var fullcolour:ColorMatrixFilter = new ColorMatrixFilter(colour);

target_mc.filters = [greyscale];

target_mc.onRollOver = function() {
this.onEnterFrame = function () {
this.filters = [fullcolour];
}
};
target_mc.onRollOut = function() {
this.onEnterFrame = function () {
this.filters = [greyscale];
}
};
The above code is basically setting the target_mc movieclip to greyscale by default, and then when you RollOver it changes to full colour, again RollOut changes back to greyscale.

My question for the guru's is, how would you go about fading the transition, instead of it being just a straight jump?

Greyscale To Colour Actionscript Help
After scowering the net for quite sometime I've managed to come up with a way to convert an image from greyscale to colour in actionscript.


ActionScript Code:
import flash.filters.ColorMatrixFilter;
var nocolour:Array = [0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0];
var colour:Array = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];
var greyscale:ColorMatrixFilter = new ColorMatrixFilter(nocolour);
var fullcolour:ColorMatrixFilter = new ColorMatrixFilter(colour);
 
target_mc.filters = [greyscale];
 
target_mc.onRollOver = function() {
        this.onEnterFrame = function () {
                this.filters = [fullcolour];
            }
        };
        target_mc.onRollOut = function() {
            this.onEnterFrame = function () {
                this.filters = [greyscale];
            }
};


The above code is basically setting the target_mc movieclip to greyscale by default, and then when you RollOver it changes to full colour, again RollOut changes back to greyscale.

My question for the guru's is, how would you go about fading the transition, instead of it being just a straight jump?

Tween Colour Image From Greyscale To Color
Hi Im first of all trying to tween an image from greyscale to colour, thought doing it sin city style might look even better, does anyone know a way of doing either method? using flash mx, abit confused about whether the use matrices works in flash mx or not... I don't really know how to implement:

import flash.filters.ColorMatrixFilter;

and whether its relevant


any help would be appreciated

thanks

How Do I Create A Greyscale To Colour Effect In Flash CS3?
Hello people! This is actually my first post...
I want to create a button with an image that i have and i want this image to make a rollover effect from greyscale to colour....how is that done????

Photo From Colour To Black And White
Is it possible as part of an effect to make a colour photo black and white without the need for two seperate images, this making the file size bigger as a result. Just out of interest is this possible, can it be done via action scripting?

Thanks

Trevor Saint

Photo From Colour To Black And White
Is it possible as part of an effect to make a colour photo black and white without the need for two seperate images, this making the file size bigger as a result. Just out of interest is this possible, can it be done via action scripting?

Thanks

Trevor Saint

Fading Black & White Photo To Colour
Hi,

I have a copy of a black and white photo which I was able to modify with the timeline effects and transform to fade to white and back, but instead of fading in to black and white, I'd like to fade in to a colour copy of the photo. Any ideas on how this can be done? I placed the Colour photo in the last frame, but this does not appear when I go to Test Movie. I am also not able to figure out the fading in to the colour picture part.

Thanks,
CdnRebel

PS: To Genesis F5, I just figured out how the title disappeared in the previous post. When it goes to preview, it removes the title and it needs to be typed in again.

How Do I Make A Colour Tween
i am able to make a motion tween eg make an object spin but how do i make an object change from one colour to another

Make Button Stay A Certain Colour Once Clicked?
I have my button which is red. On rollover, it fades to blue, and on rollout it fades back to red - fine. But what if i wanted it so that once the button had been clicked, it turned green and stayed green so a user would know that the button had been used (you often see this sort of thing in image galleries as you will have seen) Of course, on rollover and rollout the green button would not fade between red and blue as it does originally, but would still need to be active for loading in external swf files etc

Can you help me with this? an old fla or a tutorial perhaps?

I use mx - NOT mx 2004

Thank you.

Jpg Greyscale
Hi guys,
a simple question for you...
Can i load a jpg image in greyscale with loadmovie?
Thanx.
Noir

Greyscale
Is there a way to use AS to create an animation of converting a colored picture into greyscale and vice vera??

Thanks for the help.

Greyscale Filter
Does anyone know a way of using the advacned color settings to make symbols appear greyscale...

Thanks

Gareth

JPS/PNGs Turn To Greyscale?
OK, maybe this is a "feature" of the Trial version of Swish Lite, but I've added the same file (made in PSP) both as a jpg and as a png and when I preview in a browser (or add the code manually), it turns into a greyscale object. The animated text, etc is fine. BTW, I DO know that the trial version scrambles the text when you export, so maybe this is just the Trial version?

Anyone know?

It previews just fine in Swish Lite (full color), but NOT in the browser.

I can't believe the product doesn't produce color backgrounds using jpg/pngs...maybe I missed something stupid?

Making JPGs Greyscale
Hi guys!

Is it possible to dynamically make a JPG image greyscale in flash?

I don't mind buying a third-party plug-in if there is one available that will do the job!

ColorMatrixFilter - How To Set A SPECIFIC HLS To A Greyscale Png
I am able to use the color matrix filter to change the pngs that I am loading dynamicly. Thing is, I can't seem to figure out how to apply a SPECIFIC hue, saturation and luminance.

Basically I can successfully modify my grey scale png to all sorts of colors already. I need to be able to colorize them with, for example I would in photoshop put in H:212 S:36 L:-48 and it would turn out a great blue... how do I turn those numbers in to the proper color matrix to be applied?

I have done a good bit of research on hls/rgb and also tried using this adobe sample app to put in numbers similar to above, expecting to get a matrix that would apply those transformations. Using the resultant matrix, the image stays at a very low saturation even when using positive luminance values. I could guess at it, but I have a bunch of PMS colors I am going to have to match... SO at least being able to convert HLS or RGB into an applicable color matrix with predictable results is needed.

oh, btw, I don't really know complex math like cos and sin and stuff. I just want to need these HLS or RGB numbers translated into matrices if possible :) Any help is greatly appreciated.

The Magic Greyscale Constant
Well,

I was struggling with greyscale (how to compute it). I searched for it in the forum and what a soupy mess I read through. I went on the net and nobody that I researched was quite hitting the mark for what I needed.

I need a way to easily do greyscale coloring as a level between 0..255. What flash offers is a setRGB function. Here you say mc.setRGB(0x...) using a hex color. Well .. there are reasons I don't like this. 1 you have to know what the color is for a given greyscale. yada yada.

Well, I thought about this. On the one hand I should already know how to do this. (bad Rampage.) On the other hand, there are people that can benefit from me shaking off one more piece of ignorance in public

So without further adiue..


Code:
_root.createEmptyMovieClip("clip",1)
greyK = 0x010101

trace(0xfefefe)
trace(greyK * 254)
var thick = 2

for(var i=0;i<256;i++)
{
clip.lineStyle(thick,greyK*i,100)
clip.moveTo(i*thick,0)
clip.lineTo(i*thick,100)
}
... may the force be with you.

Help With Greyscale To Color Animation
I've been trying forever to find a solution to this. I took the Lynda.com tutorial on flash 8 but im still an amateur user.

What I'm trying to do is fade a greyscale image into a color image, one section at a time. I have only found a way to fade one whole image into color through a motion tween, which made the whole picture fade out a bit. This doesn't work for doing one section after another because the whole image flashes a bit and ruins the presentation.

If anyone is familiar with how to do this, or could point me to a good tutorial I would be very grateful!

Make Colour/font/size Menus Display For User Selection
hi folks,

with AS2 is it possible to make the 'embedded' Flash colour swatch/mixer appear, while an app is running, so that a user can interactively select their choice of colour and have it applied to a screen object? IF yes, how is the colour swatch/mixer made to appear?

similarly, is it possible to have the 'embedded' Flash fonts menu be displayed by a user for their selection of font?

also, font size menu?

font style selection I'm not worried about.

many thanks.

ZOMG PLEASE HELP - ColorMatrixFilter - How To Set A SPECIFIC HLS To A Greyscale Png
I am able to use the color matrix filter to change the pngs that I am loading dynamicly. Thing is, I can't seem to figure out how to apply a SPECIFIC hue, saturation and luminance.

Basically I can successfully modify my grey scale png to all sorts of colors already. I need to be able to colorize them with, for example I would in photoshop put in H:212 S:36 L:-48 and it would turn out a great blue... how do I turn those numbers in to the proper color matrix to be applied?

I have done a good bit of research on hls/rgb and also tried using this adobe sample app to put in numbers similar to above, expecting to get a matrix that would apply those transformations. Using the resultant matrix, the image stays at a very low saturation even when using positive luminance values. I could guess at it, but I have a bunch of PMS colors I am going to have to match... SO at least being able to convert HLS or RGB into an applicable color matrix with predictable results is needed.

Here is a sample of what I am trying to do, but just using CSS and JavaScript.
http://www.customtiedye.com/colors.htm - Since it is using pngs you can't use internet explorer to view it properly. But even if you have only ie, you can see that changing the selection in the lower drop down box shows you a different color of the shirt. All of these images were colorized in photoshop from the same source image I am using in the flash application. I need to translate the HLS numbers I used in photoshop into colormatrices to apply to the same image.

Here is what I have so far for the flash application.
http://www.customtiedye.com/dyeshop.html - If you don't see the flash app, try in IE, I have not bothered tweakin anything as far as html because I am stuck at this issue.
The buttons are not marked right, start at the top and go down, you'll see what I mean. I can apply the color matrixes and the effect is working, but HOW DO I GET THE SPECIFIC MATRICIES FOR SPECIFIC COLORS?

Please help :o) Thank you in advance.

Creating A Colour Dialogue Box For User To Select A Colour For Background.
Hi,
Any ideas how to create a colour dialogue box so the user can select their own pereference of background colour?
thx
shaf
(I mean inside the SWF as its running......)

How To Make A Photo Album
Hi, I want to make a webpage that has a few thumbnails lined up, then when I click on one of the picture, that picture will stretch to full size while all the other thumbnails fading out to make room the the full size picture selected. I've seen this kind of flash movie on some websites and would love to know how to do it for my small photo site. I'd appreciate your help.
Thanks.
QT

To Make This Photo Album?
Hey everyone.

I want to make a photo-album, that loads external photos.

I have already made a site, where i can upload pictures, and at the same time store the picturename and category in a database.

The flash photo-album has to - on the first page .- show the categories. When I click a category, it has to show the first picture in the category. It has to preaload each picture each time, not all of the pictures in the category...

Anyone has a link or explanation on how to start this?

- Rune

[FMX]How Did They Make This Photo Effect
I found this site and I realy wonder how the made the photo effect, what you see when you going from one content page to the other.

Thanks in advance

How Did They Make This Photo Effect
Hi guys,

I found this side : http://www.net84.de/

and i'm wondering how the photo effect is so, if that person can help me a bit to reach that effect.

Thanks in advance, Donald

[FMX]How Did They Make This Photo Effect
I found this site and I realy wonder how the made the photo effect, what you see when you going from one content page to the other.

Thanks in advance

How Did They Make This Photo Effect
Hi guys,

I found this side : http://www.net84.de/

and i'm wondering how the photo effect is so, if that person can help me a bit to reach that effect.

Thanks in advance, Donald

How Can I Make A Photo Gallery Like This One?
http://www.robertlewissmith.com/flash.ht...
Click on "projects" then click either on " Mimi&Liam's World" or on "the west of Ireland"
What i would like to create is a photo gallery such as this one.
in the past I saw many good tutorials that teach you how to make these kind of effect, but i can't find any, anymore.
Does anyone know a good tutorial?
any suggestion, links would be very helpfull. thanx in advance.

Photo Album How To Make One Or Use One?
I have taken lots lots of pictures this past weekend and want to share it with everybody but how?? photoalbum would be really cool but where ca i get a tutorial or something simple I just want to upload the pics and show them in flash nicely...

any help is welcome

thanks

16 Bit Colour Mode Problem With Alpha Fades On Colour
Please help me out. I have tried many other forums and people, but no one can give me an answer. Hopefully you can.

Have a look at a site I designed for a school.

http://www.brineleas.co.uk in 32-bit mode this is great, now try 16 bit colour mode and you will see my problem.

Please help if you know how

Trev:

Make Train Appear To Be Moving In Photo
Ok, I'm working on a intro to a band's webpage. The band went on a photo shoot and shot a pict infront of a moving train. I am trying to come up with an idea to make it look as though the train is moving in the background. I have tried a few methods but I can't come up with anything very good. First I tried using a translucent boxes that traveled along the train and gradually got bigger as the train did because of perspective. It looks ok but overall just doesn't cut it. Then I tried just using a motion blur on a the train and having it flip back an forth between that and that original (this one sucked as I expected.) For both of these I put the cut outs of the band on top to make it look as if everything was behind them. Any of you guys have some brilliant ideas to make it appear as if the train is moving??

Using An Array To Make A Photo Album?
hi all. i'm trying to set up my flash animation as a looped photo album. i think the best way is to use an array (though i don't know the action script for this). animation goes like this:

animation 1

photo A (shows for,say, 5 secs 1 out of 10 pictures - selected at random)

animation 2

photo B (same as A, but from a different batch of pics)

animation 3

photo C


and i want to have, say, 10 photos chosen at random from said array, so that when the entire flash movie loops, it plays the same animation 1, but then shows a new photo for "photo A".

i think this is fairly simple. i understand that i have to name the movie clip "photo_A", but i don't know where to put the action script or what, exactly, it should say.

any help is greatly appreciated.
Josh

i'm using flash MX on a PC

Is It Possible To Make This Photo Of Water Appear Moving?
i would like to give this photo some movement...like water rippling or something very subtle...do you have any ideas?



is it easy to make the water appear to be moving a little? i know how to use photoshop pretty good but i cant imagine what the best effect on this image would be????

[F8] How Do I Make The Clouds Always Moving In This Photo. Help
Hello
I hope im not asking for too much. I wanted to know if anyone could tell me how to make it so the clouds in the attached photo move continuously. If anyone wants to take a stab at this that would be great. Also where is a great place to download fla templates for say a full website?
thanks
Jon
http://www.eyeimpressions.com/cem.jpg

[CS3] Trying To Make A Photo Gallery Work
Hi,

I am using one of the Picasa gallery templates (polaroid) and have been trying for hours to get this gallery working the way I need.

The gallery is online here: http://eccolo.com/Site2/More/Photos/ (the images aren't optimized yet so it may run slow)

On that page you can see each frame has the image expanding outside of the white frame border. I need the images to be the same size as the black box on the inside (which is a mask that I turned off for your viewing).

I have tried everything and all I can do is manually move a holder that does not really respond to where I place it. I can stretch the photo but I cant get it exactly where I need it or the right size.

Also, the photos look lowered in quality when I test the project.

Please Help! I will send you the FLA and files if anyone would like to take a look at it.

Thanks

I Need A Tutorial On How To Make A Photo Slideshow
A step by step way to make a basic flash slideshow. No knowledge of flash, just basics. KNow how to use Fireworks ect just not flash.

How To Make A Photo Gallery With Many Pictures?
Hello,

I have a folder full of pictures that I want to be able to show as thumbnails and then enlarge when clicked.
It would be tedious to make place each thumbnail and then a hyperlink to a pop-up. Is there a way just to point them to a folder?

Ihave done this with asp, but unfortunately, my bud's server is for PHP.

Thanks again!

Tryin To Make A Photo Gallery
I wanna make a photo gallery that has like 5-10 thumbnail images that you can scroll through, and then when you click on the thumbnail, I want that picture to fade in and pop up in a empty movie clip I assume, i just need to know what action script I use. thanks!

How To Make A Photo Gallery With Many Pictures?
Hello,

I have a folder full of pictures that I want to be able to show as thumbnails and then enlarge when clicked.
It would be tedious to make place each thumbnail and then a hyperlink to a pop-up. Is there a way just to point them to a folder?

Ihave done this with asp, but unfortunately, my bud's server is for PHP.

Thanks again!

How To Make Preloaders Work For Photo Gallery
Hello,

This below photo gallery (link below) has a preloader example that I want to copy for my own gallery. The example is pretty complicated but I only want to know how to make the preloader for image viewing box.

http://www.actionscript.org/componen...onent.php?id=8

I understand how the basic preloaders work BUT I don't know how to create a preloader that runs everytime when a new thumbnail clicked. Could someone give me an example of this??

Much appreciated!!!
Kyle

How Do I Make A Photo Move In A Frame Mask?
I have a photo of mountains that I want to pan slowly, contained in a rectangular mask. I've got the photo moving okay, but have not been able to make a mask layer make the 'hole' that I want to contain the image as it moves.

How can I make a mask that will contain this animation? I see there is an Adobe tutorial on just the opposite - making a mask move while the image stays still, but that technique does not help me do the opposite.

Any info or link to a tutorial would be appreciated.

TIA,


Ken

How To Make Moving/scrolling Photo Menu?
http://media.moma.org/subsites/2008/miro/flashsite/index.html -
How can I do this?
when you move left and right and paintings move. and when you click on a painting, you see the the title and it links to another page on the site.

Photo Gallery Thumbnails.How To Make It 2 Colums
Good Day I have used the Vertical example of the photo gallery here.
Can any body help me or give saome idea how to make the vertical thumbnails in two colums? becuase it has onle 1 colum in the example.

Your help is greatly appreciated

Tween W/ Resized Photo - Can't Make It Work
Greetings from the Flash newby!
I've got a tiny test.fla with a movieclip that just moves across the stage. Using a MovieClipLoader to load the clip into myclip_mc it works fine. If I then add some scaling or resizing in onLoadInit() it just sits there. Any way to do what I'm trying to do?
thanks,
Mark

Urgent--need To Know How To Make Template For Photo Show
http://www.theculture.net/india/india2005/index.htm#

i need to make something like this (wihtout music) for lectures i am giving this and next week. i would appreciate any help doing this...or directions to a readymade template.  

peace
disfasia

How Can I Make An Imported Photo Fading To White?
I know it must be very easy, but I realy tried and tried and couldn't find a solution.
I tried to brak it apart - doesn't work.
I tried to convert it to symbol - doesn't work.

Anyone knows what's the trick?

Thanks,
Itai


Make A Photo Dissapear When Button Is Pressed
I have a FLVPlayback Movie running (instance name is ubmovie), I want to have an image hovering over it. When the play button is pressed to start the video I'd like the image to go away.

Im not sure how to do this, but I think

ubmovie.addEventListener("play",);



Im not sure how to do this, so any help will be greatly appreciated!

thanks

How Do I Make A Photo Slide Off The Screen When Someone Clicks On A Button?
I'm brand new to actionscript so this must seem like an easy thing to for most of you. Here's what I want to do:

I'm trying to make a band web site. On the bottom of the screen I have all of the links("news", "bio", "photos", "audio",). When you first open the page, it's on the "news" section by default and there is a photo on the left side of the screen. Ok, when someone clicks on "bio", I want the "news" section photo to slide off the page to the left and the "bio" picture to come in it's place. The first time I tried this, all I did was create a movie clip called "mcPhotos" where I motion tweened the photos sliding off to the left, with labels. So I had 4 layers of the different photos replacing eachother accordingly. I was happy with the animations of the photos sliding because I made them ease a little to the right first, then quickly slide left, so it looked like it had some weight to it, itstead of them just stiffley sliding left. I want it to look abrubt.

So my question is, how would I animate these photos going slighty right then sliding of the page to the left using only actionscript, and no motion tweens? Is that possible? If so, how would I tell my buttons to play these animations? I've only used labels in the past, but I want to be able to this with actionscript only. Is this very difficult? If any one can help, please let me know. Thank you.

Please Help How To Make This Photo Animation And Special Text Effects
Hi,

Can someone please guide me step by step how to make the photo animations as in the below site.
http://www.klicphotographicdesign.com/
Please guide me how to make
1. The Text effects over the photo animation as found in the above site
2. The picture animation effects as in the above site.

Please suggest me how to do it step by step.

Thanks a lot.
Mohammed

Copyright © 2005-08 www.BigResource.com, All rights reserved