ActionScript 2.0 :: Replace Colours In A .GIF?
May 5, 2005
i have an image in flash and i want to know if its possible with actionscript to replace some colors? say if i had an image with three colors: red, blue, and yellow i want flash to replace all the blue within the image to a certain color like orange without effecting the other colors of the image.
View 6 Replies
Similar Posts:
Feb 8, 2010
I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors.
So far I have semi-sucessfully used this method:
stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array
So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick.
However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours
View 1 Replies
Sep 21, 2010
I'm having some real trouble getting .replace to actually replace something. Here's my code...
[Code]...
I can trace both newFiles[i] and keywords[i][whatever], but the replace doesn't replace anything. The regex is valid as well. I'm using regexr to test it, and it works perfectly there... but will not for me and I don't know why.
View 4 Replies
Oct 8, 2009
I have a washing mashine which turns gradually as an animation. But there will also be a colour swatch on the left hand side and when someone clicks on a different colour the machine is supposed to change to that colour. The problem is keeping the animation looping while having the buttons there.
View 1 Replies
May 8, 2003
Looking at the Changing Colors Using ActionScript tut. on the website, can any one tell how to tween the changing colours
View 14 Replies
Sep 1, 2009
I am trying to create a website for a clothing company where the user can select different colours of clothing.
I can use one colour not a problem, but I will probably need 3 colours ie: shirt colour, collar colour, sleeve colour etc.
If I try to duplicate the script and change the instance and layer names but it makes it all go crazy.
Is there a way I can duplicate the scripts for each new section of colour or can I somehow tell it in the one script?
View 4 Replies
Sep 22, 2011
I have a text field that reads:"E 1-1"
can I apply two different colours to the text? "E" would be green, "1-1" would be black. Is it possible to do something like that through actionscript without creating two separate text fields?
View 4 Replies
Dec 22, 2005
Is it possible to change the colour used in a flash movie for a shape using javascript Basically we have a little logo which appears on one of our e-commerce frameworks which is "skinnable" When we setup a skin for a client I would like to be able to send some colours to the flash movie so that our logo changes to match the sites colour scheme..
View 1 Replies
Apr 22, 2006
is there a way to generate random hex colours using AS or do i need to define a set of hexs and then use a random var to determine which one is used?
View 6 Replies
Jul 30, 2009
I'm having some problems with importing images. (RGB jpegs)
When I import them, the colours, brightness and contract look totaly different.
I haven't got a clue what could cause this. And I really need to have the colours right.
View 2 Replies
Apr 10, 2010
I know that this might be a silly question but unfortunatly I can't figure out the answer for it! Well basically it's about getting a self-made background (or horizon) in an animation...THIS is a good example of the background I mean... Can someone please clarify to me how this is done? I tried the brush and bucket with different transparencies and strokes but I can't get it right
View 1 Replies
Nov 21, 2011
This person created this game:http:[url]....i was wondering if i wanted to match two different colours, how could i do this? for example, instead of matching two reds, if i wanted to match a red and green, how is this done?
View 2 Replies
Nov 1, 2010
I'm trying to use threshold to change the colours in a bitmap image according to a lookup table. I've tried the following line of code to convert each colour to another, but without any luck:[code]
View 0 Replies
Oct 10, 2003
I came across this really nice effect: see how the html page changes colour (gradually!!)
[URL]
I presume it's js, but that's where my presuming stops
I'll post anything I find out about this
View 2 Replies
Nov 10, 2004
Ive got a few plroblems with this project at the moment. Ive got the function to colour tween the shapes through actionscript. As you look through it seems ok but im trying to get all 3 boxes to change colour. Unfortunatley i can only get one to change. When looking at the functions called by the buttons the second box seems to take priority over the first one. How can i get all three boxes to change to my desired colours?URL...
View 5 Replies
Oct 10, 2003
I came across this really nice effect: see how the html page changes colour (gradually!!) [URL] I presume it's js, but that's where my presuming stops I'll post anything I find out about this
View 2 Replies
Jan 19, 2009
I am trying to create a loop that changes the colours of my dynamic vectors inside my sprite however I am not sure if I putt the following var names in the right place in the end of my statement attached or if i need another variable :[code]
View 5 Replies
Aug 6, 2010
I am trying to create a stacked column chart that will show three different values on a column with different colors.
View 1 Replies
Aug 31, 2011
how to describe what I want, but here goes. Assume I have 3 textboxes, and I enter some colour hex code in the first one, I want to apply a black layer on top of it, and have the opacity set to 50% and get the resulting colour in the second text box. Same thing, but with white on the third one.
Let me explain: consider this image below: In Photoshop, I have the base layer which is sort of sky blue in colour. I create two layers on top of it, one with black, one with white but both have an opacity of 50%. Now, I can use the colour picker (I) to simply select the two wanted colours.
I am having to do this an insane amount of times so I was wondering if I could produce it programatically.
I know, Ideally I should have tried out something, then give out the code which isn't working.. but this has stumped me enough that I don't even know where to start. The closest thing I've seen is Kuler so I think it is possible in flash at least, but then again, I don't know where to start.
Technology is not important to me, solution is - I am most comfortable with c# (at least I like to think I am) but I am a beginner in php, flash. Jquery, I am good at it with most stuff (well, who isn't?) - Php and Flash, I learnt it as a hobby just to familiarize myself.
View 3 Replies
Feb 26, 2003
ok im trying to create a clip of a dot that fades randomly between four pre defined colours whilst also randomly varying in the size range 0 - 100%. i am trying to create a smooth size tween also.this is my attempt:
size = random(100);
setProperty ("purple", _xscale, size);
setProperty ("purple", _yscale, size);
myArray = ["0x399FB6", "0xCBC5D7", "0x5A3084", "0xffffff", "0x399FB6"];
myArray[0] = 0x399FB6;
[Code]...
View 2 Replies
Jun 6, 2006
I know how to manipulate hex colours by splitting the num bers up and perfoming calcutaions on them using bit-operators. Thats fine... but i now need to manipulate colour not using the normal RGB. I need to be able to add two colours together like paint. E.g. red and blue equals purple, yellow and blue equals green. Has anyon e had any experience with this and even more importantly can it be done? (i assume it can... nothings impossible)
View 14 Replies
Feb 19, 2010
Would like to know is it possible to dynamically generate a range of colours. Eg. from red to green ["0xFF0000", "00FF00"]Specifying a range of 100 in between colours Final results of an array of 100 colours ["0xFF0000", .., ..., ......, ..., ..., "0x00FF00"]
View 5 Replies
Nov 1, 2010
I'm trying to use threshold to change the colours in a bitmap image according to a lookup table. I've tried the following line of code to convert each colour to another, but without any luck:
Code:
bmd.threshold(bmd, bmd.rect, new Point(), "==", originalColour, newColour);
I have not had much luck so far, I've only managed to generate a black and white image, or nothing at all.
View 3 Replies
Jun 21, 2011
I just created an application in flash with the topic colour harmonies. You are able to pick three colours from a colour wheel. Those colours are transformed into a scaleable grid in the arrangement colour 1, colour 2, colour 3, colour 1, colour 2, colour 3,. If you scale down the grid to pixel squares you can see the mixed colour (usually it should be displayed grey then because of the color harmonie law). Now I want to compare this process to a computer generated colour out of those three basis colours. So is it possible to mix the three colours and transform the resulting mixture colour (usually grey again) into a new colour field? Or is there any function that does the same?
View 15 Replies
Aug 3, 2011
I am getting a duplicate variable trying to get different colours to move to the object in a colouring book. here is the code. I am only getting the color red.
[Code]....
View 2 Replies
Jul 6, 2011
So I can tween shapes and such for their colours, but when I try to colour tween text, it won't work. I've tried various things, motion tween, shape tween, making them movie clips, making them graphics, ect. How do I make text tween between colours to get a nice smooth transition?
View 2 Replies
Aug 3, 2010
I am trying to make a text effect where the colours fill up inside the logo lettering as if water was being poured in. Is there a way of doing this either by Actionscript or some form of advanced masking perhaps?
[Code]....
View 1 Replies
Jun 14, 2006
i am trying to make a drawing board(like colouring book) where when i click and MOVE THE MOUSE it colours the object(more like a brush and not as a paint bucket)i would like to know how to colour objects individually(without coloring background) and the most IMPORTANT is there any way to detect what percentage of object had been colored(like if 100% of object coloured something happens!)
View 2 Replies
Jun 22, 2011
I've got a strange situation where I'm replacing the text in a string that I've taken from an XML, but the .replace function for the string keeps failing. I've tried running the example given on the Adobe site, so I know the value I'm trying to replace ("%20") isn't at fault - it's something about the string I have! I've included the code below, but it seems correct. Is there a particular tip I should know when taking XML values into AS3? I'm putting them in strings for this project.
[Code]...
View 5 Replies
Apr 4, 2009
I am making a simple platformer game with weapons and so far everything is good but i need to find a way to make it so when the player touches an object it replaces the movieclip with something else? [code]...
View 4 Replies