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




Is Flash Able To Blend Colors?



Hi,

I am using flashes draw function to make squares of different colors like this:

beginFill(colorCode[colorCounterArray], 10);
moveTo (10,10)
lineTo (20,10)
lineTo(20,20)
lineTo(10,20)
lineTo(10,10)
endFill();

As these squares begin to build on top of each other, the colors bleed together but I need them to blend like paints or light does depending on your choice. Here is an example of light blending, as I would like flash to do:

http://www.thetech.org/exhibits/onli...t/magenta.html

See how red and blue make magenta. When I make two boxes in flash, one red and the other blue, and put them together I do not get magenta, and to make it worse, I get two different colors depending on which color is on top.

Is there a way to blend colors in flash so red and blue make magenta etc ...?



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-04-2005, 02:15 AM


View Complete Forum Thread with Replies

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

Is Flash Able To Blend Colors?
Hi,

I am using flashes draw function to make squares of different colors like this:

beginFill(colorCode[colorCounterArray], 10);
moveTo (10,10)
lineTo (20,10)
lineTo(20,20)
lineTo(10,20)
lineTo(10,10)
endFill();

As these squares begin to build on top of each other, the colors bleed together but I need them to blend like paints or light does depending on your choice. Here is an example of light blending, as I would like flash to do:

http://www.thetech.org/exhibits/onli...t/magenta.html

See how red and blue make magenta. When I make two boxes in flash, one red and the other blue, and put them together I do not get magenta, and to make it worse, I get two different colors depending on which color is on top.

Is there a way to blend colors in flash so red and blue make magenta etc ...?

Blend Colors
I have 2 mc's on stage, - one is draggable and has an alpha of 50 %.

My code in frame 1 is:

// instance of the color object
squareColor = new Color("red_mc");
squareColor.setRGB("0xFF0000");

// events on red_mc
red_mc.onPress = function(){

this.startDrag();
trace("color = "+squareColor.getRGB());

}

red_mc.onRelease = function(){

this.stopDrag();

}

So now I wonder if there's any way I can get the color value for the color I get when I drag red_mc over my 2. mc, - I mean if mc1 is green and mc2 is red, - the result would be a dark red, - but how do I get that value at runtime?


Kind regards

Godowsky

Flash Colors Vs. HTML Colors
I'm having a issue with the colors on a client site we created matching up. I think this is a pretty unique problem. Here is the url: URL I created the flash to appear as if it was under the swoosh, but to give the masking effect of the images are appearing from under the swoosh I had to include part of the swoosh in my flash movie. By doing that I have a color issuse on monitors using 16 bit color. My boss is getting on my case to try and find an answer for this problem and he is the type that doesn't take no for an answer. He wants it fixed and that's the way it is! If anyone could ge me an advice that would be greatly appreciated!

Blending Modes In Flash? Trying To Get A Multiply Blend Mode...
in photoshop.. im working on a blend mode from a file a client gave me to flash out...


can flash do blending modes.... i have a red square that is multiplied on a photo...

am i just going to have to settle on turning the opacity of a red box... or can i multiply the color of the red box in flash?


-thanks A MILLION in advance...


-manny

Colors In JPG And Colors In Flash
Hi, I recently made a website and I have images that I want to transfer seemlessly from JPG to Flash. My website is http://www.Sergprotector.com/2. However you will notice that the JPGs along the borders are not the same as the flash image. Is there any way I can avoid this? Flash blunder? Thanks

Setting Colors With .setRGB (myColor); What Is The Code To Set The Colors 0xRGBB?
sliderColor = new Color(sliderButton);
trackColor = new Color(track);
arrowColor = new Color(arrows);
sliderColor.setRGB(myColor);
trackColor.setRGB(myColor);
arrowColor.setRGB(myColor);

hmm...i got a scroller that i want to turn white and black
this is what it is set to..
what is the code ? is it hex color code? this is weird

help would be appreciated thanks.

Load Ext. Swf - Blend Over
imagine a white page with 3 buttons [red, blue, yellow]. what i need to do is: on whatever button i click, the background changes the color, fading the new color over the current one.

what i did is making 3 swf fading in from alpha 0 to 100 and loaded em into the basic movie by click. this works fine for once. but the next "fade over" starts again with white.

is there an easy way to solve that problem? i'm the hell thankful for each proposal about. of course this was just explaining sample. in fact, we want to fade jpgs over the current one where ever we are in the menu.. around 70 menupoints ...

THANKS

Blend Layers?
I've created two movies on two layers in a Flash MX scene, and I want them to BLEND and not STACK (see example, below). I want the colors to blend rather than to stack one atop the other. Any ideas?

Ciao, and thanks!

Help Blend Modes...
Does Flash MX support blend modes similar to blend modes used in Adobe Photoshop layers? (ie: darken, color dodge, color burn) I saw a Flash piece by Quark that appeared to use blend modes. Please check it out at

http://euro.quark.com/en/about/holiday/Quark04_UK.html.

If not, how was this done? My "Flash intuition" tells me that intricate masking or action scripts were used.

Is There A Blend Mode For This...?
I want to take my stage, and everything on it, and make all the colors black (or greyscale).

Is there a blend mode that can achieve this easily, like for inverting colors?
(for inverting, just put a big mc on the top layer, and set the blend mode to invert.... easy)

If not, what's the easiest way to do this?

Blend Mode
Hi,
I am new to Flash. After going over tutorials, I was able to create a swf file and it appear fine in html page. In this flash animation, I have layer with a movie clip. I placed this movie clip with Blend mode: Multiply, so the white background disappear over bitmap image while it moves around. And it works as I intended when it published. However when I place this same swf file in a slide panel in a presentation, Blend mode is not working and unwanted white background appears. Can anyone tell me what I should do? Thank you for your help.

. . . After I post this question, I learned I needed to copy frames from the first flash document, and paste those frames in the presentation document. Yes, now it is working perfectly. ... Thank you for having place to post my question, anyway.






























Edited: 12/05/2006 at 11:57:09 PM by rakuenblue

Blend An Image
Hi there years ago I learnt how to both mask a bitmap into a shape while at the same time apply an alpha blend to the image so it fades into the bg at the edges like a cross dissolve.
This wasn't done in code or anything like that - can anyone remind me how?
Also please note this is for a piece of desk top publishing and not a flash movie so runing some code isnt what I want as I just intend to export the design as png for an iterface.

Please advise,

Alex.

Desaturate Blend?
Hi.

I want to use desaturation blend on Flash CS3, but there is no such ability.
Do you know any other way to create a pseudo-desaturate blend in Flash CS3, using other blends and advanced features values?

Ps. It's a bit sad that Flash CS3 doesn't have desaturate blend while PS and AI have.

Blend Layer Help
Hi all, I new to Flash and have been following the SAMS 24 hours book. Currently, I stuck at the Colours part. I can't seem to get the Layer effect from Blend to work on symbol instances. Whenever I select Layer, the instances overlaying each other doesn't manifest the effect and remains the same.

Help would be much appreciated

Blend Mode, Please Help
hi

i have a platform game.
two people putting bomb and trying to blow up each other.
i want that when the bombs explode, it creates a hole in the ground.

how can i do that?
i've heard about blend mode but i'm not sure it will work for that, and i don't know how to use it

anyone can help?

thanks for answers

Blend Mode
Hello,

I have been modifying the "Carousel" from Lee Brimelow's great tutorial.

I want to set the tooltips blend mode to "add".

I should be able to use this: home.tooltip.blendMode = 8;

But it dosen't look any different. I CAN however, change the mode to multiply, invert, etc... but the add refuses to work.

One other question...

Does anyone know how to change the blend mode on the individual icons in the carousel? (So one is add, one is screen, etc...)


Help!

Thank you!!


Dave

Blend=0 Problem With Movielclip
i have a movie clip that i press on
the problem is that some parts of the movieclip's bg are transperent=nlend=0%
the prblem is when i try to press on this places it dosnet press thos places!
what 2 do thanks in advance
peleg

Blend In Image On A Roll Over
I am using flash mx pro 04,

How do I create a simple roll over..

I Have a button, I want a movie to play when I roll-over the button..

seems simple but I have not been able to do it all day..
an then have the movie play in reverse on roll-off

I can use am imaage too if needed..

thank in advance.

Blend Mode Weirdness-HELP
Hello,

Hopefully some of you gurus can help me!

I have some icons loading from an XML script. I want to change some of the icons blend mode to additive while others stay normal.

When I simply add this to the script:

blendMode = "add";

Then the additive works properly but all the icons are affected.

But when I single out an icon to be additive, the "add" effect does not work. Other effects however do work such as invert and subtract so I know I am affecting just the one icon.

I am assuming that for some reason, when I single out one icon, it does not recognize the background image so that any blend that interacts with the background does not appear to work..

Anyone know whats going on and how to fix it?

Thank you!


Dave

LoadMovie And Blend Modes
Greetings,

CS3 - action script 2

I have two images that I am loading dynamically into movie clips on the stage using:

_root.zodiac.loadMovie("zodiac.jpg")
_root.backGround.loadMovie("back.jpg")


The image / mc on top of the stack, zodiac.jpg, needs to have the BLEND MODE of multiply.

I have manually tried but it doesn't appear when loaded. I can see the place holder box change blending mode. The image, when loaded, is however un-effected.

Any help would be a life saver.

Thanks!

etherbend

Alpha Blend Issue
Hi there,

I am trying to fade a box of color that is the same color as the background from alpha 0 to 100. I am getting this odd artifacting or flickering while the fade tween is done. Once the animation is complete the color is proper. The issue comes during the fade.

Does anyone have a solution to get alpha blending to work without this flicker?

thanks.

Blend Mode Weirdness
Hello,

Hopefully some of you gurus can help me!

I have some icons loading from an XML script. I want to change some of the icons blend mode to additive while others stay normal.

When I simply add this to the script:

blendMode = "add";

Then the additive works properly but all the icons are affected.

But when I single out an icon to be additive, the "add" effect does not work. Other effects however do work such as invert and subtract so I know I am affecting just one icon.

The only thing I can figure is that when I single out one icon, it does not recognize the background image.

Anyone know whats going on and how to fix it?

Thank you!


Dave

Additive Color Blend
Hello!

I have a red mc, a green mc and a blue mc. They are moving randomly on the stage at runtime. I would like that the overlapping zone take the additive color blend, so that means that if the blue and the red mcs overlap, their intersection becomes purple.

Any idea how to do this?


Thanks for any help!

alexandre

Coded Blend Mode?
I know how to select blend mode when in the flash authoring environment... but what if i want to make a drop down box with the different blend modes and dynamically change the blend mode @ run-time on a movieclip.

to give the user a way to change it.

is that possible?

ty in advance!

Blend Mode Over Buttons Bug?
I am having a serious bug as i believe it to be.

When i make a button that has a shape that's set to a blend mode above, when hovering over the button it seems to have a serious bug.

When hovering above the blended shape (upper half) it does not select the action script. I have tried separating and moving to different layers with no success.

Please see attached 7kb

Any Ideas?

Button With Screen Blend
For the life of me i cannot figure out why when i have a screen blend above a button makes the button no longer selectable.

If you open the button movie clip the script is in there and its very simple.

Please download the small file:
http://www.hicommfcu.org/jg/buttonblend.fla

Color Blend Transition
Is this the easiest way to do this?

Blend Mode Options?
I noticed that the blend mode option is offered only to movieclips, and not BitmapData's...and even then it's extremely slow if you're working with gradient fills, and trying to render 100's of them in real time. My question was if there are other options in doing this, preferably with BitmapData, and not requiring to use a movieclip, fast? Corel Photopaint does the "If Lighter" operation very fast, so why can't Flash?

Thanks,

CL

Apply Blend And Alpha Together Via AS?
I'm working with duplicating a bunch of movie clips, attempting to recreate a waterfall affect. For each drop I apply a overlay filter progmatically, and I want to set the alpha to a value of ten or so. So the script I used to do this was:

quote:this.blendMode = BlendMode.OVERLAY;
this.alpha = 10;


I don't receive any errors for this, but the alpha coloring doesn't seem to apply unless I set it to 0 (in which case all the drops disappear). Any ideas or suggestions?

Blend Modes And Screenshots
Hello, when playing with blending modes I noticed that they affect the background of an html page.
To me this says that flash is interpreting the image below and adjusting the pixels in flash. If this were true it would be possible to take screen shots of websites by overlaying a big flash file with absolute positioning.

You can check out the mock I made up to see what I mean:

http://themovement.info/flashtests/bbc.html

I tried copying the bitmap of _root and other movieclips but it does not record the html site in behind.

Any ideas? this could be totally sweet!

Blend Mode At Runtime
Hello,

Can i apply a blend mode to the movieclip at runtime..I mean through actionscript coding.

Is there any way?
If yes please give details.

Thanks in advance

- Smita

LoadMovie Into A Blend Mode
Hello, I am loading in a picture from an external location via actionscript. It is loading into a MovieClip which has a blend mode set to Multiply via the flash interface.

When it loads in, the picture isnt affected by the blend mode. Why is this?! Is there a way of making the pic take advantage of the multiply blend?!

Thanks to any advice

Flash 5 Colors
HI
I need to know how can I created my own color palette in Flash 5. I cleared the default color palette and I want to add my own color one by one, I got the colors numbers codes and the R G B numbers as well, the palette I want to add was put together by a company, is a web safe color palette and is order by Hue, here is if some one want to use it http://www.lynda.com/hexh.html

Can some one tell me please how can I add the each colors into a new flash palette for my self?

thanks

Alex

Flash And Colors
Hi!

One of my co-worker send me this link this morning:

http://coloringbook.tripod.com

I was wandering if this kind of applet can be made in flash ?
This applet import a black and white image, *.gif, and can color every pixel in the image. The different sector of the image is separated by a black line. It is done automaticly.

Is there a function in flash that can do the same thing ?

And without cutting each piece of the image in different mc.

Thx

Actionscript Fade/Blend Between External SWF's
alright, per my actionscript ignorance, i have not been able to implement this idea.

i have my main movie with five buttons (sketch, people, links, contact, projects) that load external swf's onto levels in the main movie.

in one of those external swfs (people) i have a menu that loads 12 more external swf's (resumes) into an empty movie clip on the stage.

i want to have it so whenever you change between any of these external swf's you have a fade effect.

any help would be appreciated...

noah

How 2 Blend Diffrent Swf-movies Realtime…
how 2 blend diffrent swf-movies at realtime + record those
…there maybe an answer with mx

Run-time Erase Blend Not Working
Hi Everyone,

Can anyone tell me why this flash file isn't working? I'm trying to do a run-time erase blend, and it is definatly because of the as because if I draw a circle in the ter.mask mc manually, it works.

Thanks,
Lucas!

[F8] Loading External SWF Containing Blend Modes?
I have an SWF that I want to use as a background for another movie, that specific SWF contains layers with multiply blend modes.
When viewing the background itself it shows fine (http://novastella.net/test/main.html).
However when viewing the background as a loaded movie the blend modes disappear (http://novastella.net/test/index.html)!

Any reason?

[MX04] Blend Modes In External MC's
I'm trying to load external SWF's into a blank movie clip holder,,i need the clips to load in with the "Screen" blend mode..i tried setting the blank movie clip holder to "screen" but it doesn't work,,it only allows you to control transparency and color,,please help (action script 2.0)

Blend Mode While Dynamically Attaching?
I know that I can make a container that has a blend mode of let's say "multiply", thats set on the stage and load things into it.

But is there are way to set the blend mode in actionscript while attaching movieclips?

How Work This Blend Mode Mathematically ?
hi all


i need to know how work this Blend Mode :
Layer, Overlay, Hard light, Add, Subtract, Difference, Invert, Alpha & Erase . Mathematically ?



Regards
Crimson

What Use Does The Alpha And Erase Blend Mode Have?
I'm not seeing how to use these blend modes. They both just seem to make the clip totally invisible. You can't tween it like you can the Alpha color mode. So what good is it? Why'd they bother to add it? Maybe I'm missing something here. I looked at the explaination in the help docs and got these convoluted description:


Quote:




Alpha applies an alpha mask.

NOTE

Alpha blend mode requires that a Layer blend mode be applied to the parent movie clip. You cannot change the background clip to Alpha and apply it because the object would appear invisible.


Erase removes all base color pixels, including those in the background image.

NOTE

Erase blend mode requires that a Layer blend mode be applied to the parent movie clip. You cannot change the background clip to Erase and apply it because the object would appear invisible.




Can someone maybe show me a quick example of something useful the alpha or erase blend mode can be used for? Or an effect it can do that can't be done with a alpha color mode modification?

BitmapData Blend Mode Problem
Hello,

I just found this function on gotoandlearn to tile a background image.


ActionScript Code:
import flash.display.BitmapData;

var tile:BitmapData = BitmapData.loadBitmap("tile");

function fillBG() {
    this.beginBitmapFill(tile);
    this.moveTo(0,0);
    this.lineTo(Stage.width,0);
    this.lineTo(Stage.width,Stage.height);
    this.lineTo(0,Stage.height);
    this.lineTo(0,0);
    this.endFill();
}

fillBG();

This works great. But my problem is, i want to change this bitmap's blend mode to overlay. I think that i must use draw function but im not really sure.

I hope someone can help out.

K.

How Work This Blend Mode Mathematically ?
hi,


i need to know how work this Blend Mode :
Layer, Overlay, Hard light, Add, Subtract, Difference, Invert, Alpha & Erase . Mathematically ?



Regards
Crimson

Faking Blend Modes In MX2004?
I have been given a concept by the designer for a flash site and one shape that sits on top of an image uses a blend mode 'hard light' at 100% in photoshop. Now i know flash mx 2004 doesnt support blend modes but is there a few tricks i could do to fake it?

shape is this color - fcba3d with normal blend mode applied....its an important part of the design and we are using flash mx 2004...

any ideas would be appreciated

Dynamically Load/blend Jpg's With Next/prev Btn
I'm hoping to be able to download jpg's one at a time for each press of my next button. And be able to go back to each jpg by pressing a previous button.

However, i need each loaded in jpg to blend in while the previous one blends away `underneath' it. Each jpg will be loaded into the same place and position on the stage. (All jpg's are the same size). I could load in swf's with the jpgs on them if you recommend. But my actionscript is intermediate at best and doing the scrolling back and doing the blending in and out is beyond me just now. (for dynamically loaded in stuff).

(I have managed to do this on the timeline but that means downloading all the jpgs whether you want to see them all or not , so im looking to learn the efficient actionscript way.)

Any ideas or suggestions please?

Thanks Alot. Sam.

Papervision Blend Mode Method?
I was curious if anyone had knowledge of how to apply a Blend Mode to a 3D object (or it's material) in Papervision. I've attempted to apply a blendMode property to a MovieMaterial and the MovieClip (in the MovieMaterial) but neither works. Any thoughts on this would be highly appreciated.

Thanks,
Jason Villmer
jason@villmer.com

HELP PLZ / Blend; Use Runtime Bitmap Caching
Hi ... am using flash MX pro 2004, and am working on some masking yet the blend check box for useing runtime bitmap caching in the bottom doesnt exist. is there anyway i can make it apear ?? or is it the flash am using ??

I would apreciate some help plz :roll:
cheers :lol:

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