ActionScript 3.0 :: Bitmap Hue Shift With Custom Palette?

Feb 28, 2009

How do you shift the colors of a bitmap image, with a red/yellow cloud, so that red becomes orange, then yellow, then orange, then red again? The yellow should go trough the same process, but start and end with yellow. Same with all the other colors in between.Kind of like when you play with the hue-setting in photoshop, but instead of looping trough the whole spectrum, it only loops trough red>orange>yellow>orange>red.

View 7 Replies


Similar Posts:


ActionScript 3.0 :: Bitmap Palette Shifting Using 2D Lookup Table

Oct 29, 2010

I'm having some problems porting a palette shifted animation system from J2ME to Flash. The system is used within a game that construct characters from separate body parts for e.g. head, left arm, legs, eyes, mouth etc. These can then be tinted and animated. Each of these body parts is coloured using a look up table. There is the original palette, then there are 18 other palettes that can be used to tint the image. This way you can configure different looking characters without having hundreds of different images. Each palette has 398 colours, there are 18 different palettes in total.

Each body part contains a small amount of colours, usually around 10-20. Colour A1, Colour B1 etc... Then the body part can be tinted using another set of colours, for eg Colour A3, B3, C3 etc.. It's simply a 2D array. (I have screenshots that help explain if needed) Now I've been trying to use PaletteMap, without success. I believe it uses a full colour palette (i.e. 255 vals per colour), and can't simply change colour A1 to colour A3 etc.

I also tried threshold, but that doesn't seem to be fit for purpose. getPixel / setPixel is way too slow for my purpose. It needs to be pretty fast as each body part is animated. I have a lot of flash programming experience, but never at such a low level! I might have been using paletteMap / threshold incorrectly, but the adobe docs leave a lot to be desired!

View 0 Replies

ActionScript 3.0 :: Creating Custom Color Palette On Paint Project

Feb 9, 2009

I want to make a custom color palette on my paint project that I am developing. Also need 'paint bucket tool ' functionality.

View 0 Replies

Actionscript 3 :: Flash: Bitmap Inaccuracy - Image Appears To Shift One Pixel?

Oct 12, 2011

I load a bitmap to the stage, it's a GIF and set to lossless compression. I have ensured its coordinates are integers and have not allowed smoothing (smoothing somewhat fixes the issue but reduces quality of the image).The problem is the image appears to shift one pixel to the left and add that pixel on to the right side meaning one side has no border and the other a double border.The original bitmap does not have this issue, and there is no transparency .etc in the image.

View 1 Replies

ActionScript 2.0 :: BitmapData And Transformation Matrices - Shift The Newly Created Bitmap?

Jan 29, 2007

I've started getting to grips with using the BitmapData class and a Transformation Matrix in the hope that I can start making some interesting image effects. However, at the moment Im having trouble figuring out how to shift the newly created bitmap so that any scale transformations are applied from the center rather than the top left corner. See here for example: [URL] The flower on the left is the original, the flower on the right is the new image created using "bitmapData.draw()". It has been scaled up to twice the size, but I want this to happen from the center of the image.

[Code]...

View 5 Replies

ActionScript 3.0 :: Pass A Bitmap Between Two Custom Classes?

Mar 22, 2010

I have two custom as3 classes, TriviaGame and TriviaQuestion, and I am  attempting to retrieve a bitmap image stored in TriviaQuestion and have  found it impossible thus far.

It seems the root of my problem is that bitmap is somehow null in my GetImage() function, even though it is class data that has been set earlier in  ImageLoaded(). The only time I am able to access the bitmap's info (in order to add it  to the display) is inside ImageLoaded().
 
In TriviaQuestion.as, loading the image:
private function XMLLoadedHandler (e:Event):void
{
xml = new XML(e.target.data);

[Code].....

View 14 Replies

AS3 :: Flash - Copy Custom Shape Out Of Bitmap

Dec 3, 2009

I have bitmapA which is rectangular. I have a crop area I want to copy...

However, the bitmap is at an angle from the crop.

How do I copy a section from a bitmap that isn't a rectangle laid outon the x, y, axis??

Or copy custom shape?

View 2 Replies

Flex :: Use FXG Or Bitmap Images To Create Custom Skins?

Sep 6, 2010

I need to create a lot of custom Flex 4 skins, in most of the examples I found on the web people use FXG in order to create the skins but if a lot of the icons I use are not resizeable should I still use FXG or better use just plain old bitmap images (jpg. png)?

View 1 Replies

Professional :: Color Palette Not Saving

Sep 24, 2011

I use a custom color palette in Flash CS5.5, it was originally created in flash 8. I have it saved as default in the swatches tab. Every time I create a new document it loads this original color palette. But after I save the file, close it and re open it, it always loads the web 216 palette.

View 1 Replies

ActionScript 3.0 :: Palette Swapping The Ninja?

Apr 27, 2010

I'm a pixel artist struggling with AS3.I want to load a sprite sheet from file, actionscript through the five rows of colors in the upper left to identify the five palattes (by default, the sprite sheet is colored using the first palette), then recolor the entire sprite sheet according the one of the five palettes, setting magenta to transparent. The end result being the ability to do this...

I can do loops and arrays, but I don't know how to actually cycle through the PNG identifying and replacing colors. I've loaded the sprite sheet and scrolled the palette out of view using scrollRect, but nothing else.

Code:
//Scale the screen x3
scaleX=3;
scaleY=3;

[code]....

View 4 Replies

Actionscript 3.0 :: Draw Lines With Flash's Core Graphic Class But Attach A Custom Bitmap To That Line?

Mar 31, 2009

[URL]

Are they just constantly adding MC's to the display list as the mouse is moved around? Doesn't that kill memory?

Is there a way to draw lines with Flash's core graphic class but attach a custom bitmap to that line?

View 10 Replies

ActionScript 3.0 :: Flash Palette Swapping At Runtime?

Nov 29, 2011

Well we've all probably seen the "Mortal Kombat" ninja before. But how possible is it to do this with AS3 using a bitmap in a mc. I have searched all over the place for a tutorial on how to go about this but I can't seem to find anything that suites my needs. Do you think Flash has the power to do this at runtime for a game?

View 14 Replies

ActionScript 3.0 :: Choose Three Different Colors From A Color Picker Palette?

Jan 8, 2012

This is my drawing code that I have now, and I wanna be able to use the color picker palette to chosse between color red, green and blue.

[Code]...

View 9 Replies

Professional :: Palette Swap Animation Without Overly Duplicating Symbols?

Jan 10, 2012

This is to be exported into a movie, so not an Actionscript question. I'm making a parody of a fighter-game scenario. One character looks like Subzero and the other like Scorpion. They're the same models but one should be colored differently. They're comprised of symbols such as arms and legs to make a larger overall character animation. There are several animations of them, for kicks, punches, bobbing, etc. Now, I know that if I went in and edited the colors, that all instances would change accordingly. Duplicating the symbol doesn't work because they share the same inner symbols. Is there a method for "deep" duplication? A tint doesn't work because essentially I only want to change the color of some of the components.

View 7 Replies

ActionScript 3.0 :: Flash OOP - Add Own Custom Property To The Flash.display.Bitmap Using A Public Static Method?

Jan 3, 2011

Is it possible to add my own custom property to the flash.display.Bitmap using a public static method? I'm trying to write a bitmap utility that does something to a bitmap, and stores a Number property onto it afterwards.

[Code]....

I'm still learning AS3.0 OOP, I think that this can't be done with this method. I think I have to make a new Class that extends 'Bitmap', add the prop there, and then in the Main.as make a new instance of that class, point to the target Bitmap, and run the method in the extended 'Bitmap' class (?).

View 6 Replies

Professional :: Create Document To Change Colour Of Certain Graphics Using Own Colour Palette

Jul 14, 2010

I want to create a flash document that allows me to change the colous of an image using a colour palette of my own. I am a complete beginner and have no idea where to start this, hence i would need to know what to do and how to do it. I basically want the image to be a simple 2d image that i will create using different layers in photoshop and import them into flash, the layer images will all be one colour so the colour of the whole layer changes. so the colour palette will be on the side of this and when i click on an image and then a colour the image changes to the colour i clicked.

View 3 Replies

Professional :: Create A Color Swatch Palette For End User To Select An Item Color On A Ecommerce Site

Jun 15, 2010

We are creating an ecommerce site for my business and am trying to create a flash file that will allow the end user to select a color from a palette of 64 different swatches that they would like their item to be so it processed it into the order. I only need to create the flash file so they can select the color.

View 4 Replies

ActionScript 3.0 :: Use A ComboBox To Select A "colour Palette"?

Nov 14, 2009

I want to use a comboBox from which the user selects a colour theme. When the item is selected, I want it to run a function that will then change various item's attributes. I don't know where to store the new attribute values though. I tried storing them in comboBox item under DATA but that didn't work. I also tried having a function as data which didn't work either.

View 1 Replies

ActionScript 2.0 :: Colour Shift In Swf?

Jun 21, 2010

I have a psd that is to be the background of a flash site that i'm working on. I've tried every combination of exporting from photoshop and flash but the end result (in the browser) is always significantly brighter.Does anyone know what the best prossess for keeping the colour of imported raster content accurate in swf while keeping the size moderate?

View 1 Replies

Grouping Causes Motions To Shift?

May 7, 2009

I have a simple movie of a person - torso, arms, legs, each on a separate layer.  I'm adding a walk cycle and use tweens to move the arms and legs.  This works fine when I export to an swf.  But when I group and try to export to a movieclip, the arms jump way up.  This seems like a simple problem of adjusting coordinates, origins, etc.  But I'm kind of a newbie, so does someone have a suggestion for me?  How do I export to a movieclip and have it playback the same as when exporting to a swf?

View 5 Replies

ActionScript 2.0 :: Colour Shift In Swf

Jun 21, 2010

I have a psd that is to be the background of a flash site that i'm working on. I've tried every combination of exporting from photoshop and flash but the end result (in the browser) is always significantly brighter. Does anyone know what the best prossess for keeping the colour of imported raster content accurate in swf while keeping the size moderate

View 1 Replies

ActionScript 2.0 :: Color Palette - So The User Can Select The Color?

Sep 16, 2004

Anyone knows a good color palette source? something with a choice of, i don't know, 20 or so colors.. So the user can select the color he wants..

View 2 Replies

ActionScript 3.0 :: XML Imported Links Shift?

Jan 14, 2009

I have an issue with links in a text box which are pulled in from a xml file.The problem is that when I have the antialias setting set to Advanced the links will shift their position to the left when you hover over them. If i turn the antialias setting off or to Normal the problem is fixed, but the text doesn't look as nice.

Here are the settings for my textbox.

Code:
bodyText.defaultTextFormat = txtFmt;
bodyText.styleSheet = cssStyle;
bodyText.embedFonts = true;
bodyText.antiAliasType = AntiAliasType.ADVANCED;

[code].....

View 0 Replies

ActionScript 3.0 :: Distinguishing Between Left And Right Shift On Mac?

Jun 17, 2009

As mentioned in this post KeyLocation.LEFT and KeyLocation.RIGHT only work a Windows PC, not on a Mac. I found that out the hard way during a presentation today :X

Is there any fix to determine which shift key is pressed on a Mac?

View 5 Replies

ActionScript 2.0 :: Way To Say Like If BOTH Shift And Space Are Down GotoAndStop?

Jan 12, 2010

I was just wondering is there a way to say like if BOTH shift and space are down gotoAndStop(3);?

View 1 Replies

ActionScript 2.0 :: Resize The Clip If The Shift Key Is Down

Apr 19, 2010

when a moive clip is clicked in my program it's instance is saved in a var _root.dis_one. My code makes the movie clip move when the shift key isn't down according to the arrow keys, and it is supposed to resize the clip if the shift key is down _root.dis_one is storing the proper var, but i am having a trouble with the resizing part. It will rezise a pre-maid movie clip, but it won't resize my dynamic movie clips. is there a certain way to rezise a dynamic MC?

[Code]....

View 3 Replies

ActionScript 2.0 :: Shift The Co-ords Of The Mouse?

Jul 30, 2006

Am having a poke around with an area when pressed, it will reloated the mouse position.I dont think it is this simple.

_root.nozone.onPress = function(){
_root._ymouse = 10;
_root._xmouse = 10;
}

View 1 Replies

ActionScript 2.0 :: CPU Heavy Alpha Shift?

Sep 22, 2006

So i am building a site for a client, and in it i have incorporated an automatically cross-fading background made of large photos.Wheneve they cross fade programatically my CPU gets WORKED!

I am using

Code:
if (this.photo1.imageholder1._alpha<100-this.fadeSpeed) {
this.photo1.imageholder1._alpha += this.fadeSpeed;
}

as the fading command. Is it just a characteristic of flash that it HATES to do ALPHA changes?

View 6 Replies

ActionScript 3.0 :: Bitmapdata.hitTest - Bitmap 'emptyBitmap' With Bitmap Data Created

Feb 3, 2009

I'm cutting my teeth in actionscript 3 on a game that has a character running through a world. So, I have set up my Hit Testing by using the bitmap data hit test method, since I figured my world is going to be destructible - it'd be nice to update the level and then redraw it and have the character interact with the new change. (That works beautifully) I am however; a bit confused as to how I have my hit Testing set up. I've been messing around with it, and it works for now - but I'm not sure why.. currently, I have a character set up by using a class I built and using a series of animations I created. So, this character has a walking and falling animation, etc. This is a movie clip.

Then there's a bitmap 'emptyBitmap' with bitmap data created - however; I never really added this as a child to the character. This is sized to the dimensions of my character. My level is created as a movielip, then it's drawn to a bitmap - when the level movieclip is changed, the bitmap redraws, and that's how this updates.

[Code]....

View 1 Replies

ActionScript 3.0 :: Use The BitmapData Property Of A Bitmap And Pass It To The Constructor Of A New Bitmap Object?

Aug 20, 2009

I know the topic of "duplicating" movieclips is a hot issue with the new virtual machine. Luckily, I understand the implications. I only am [currently] interested in duplicating a Bitmap. See, I load an image from an URL using 'flash.display.Loader.load', which is a non-blocking operation in Flash Player.However,I may use multiple copies of the loaded image (which is reported to be a Bitmap, naturally) in the display list at the same time.Hence, I naturally do not want to load the image from an URL every time, because I don't want to wait for a non-blocking call to complete. Nor do I need to - I mean one copy is already loaded, so it should be possible to just "duplicate" it, right?

My idea is to do use the bitmapData property of a Bitmap and pass it to the constructor of a new Bitmap object. I have not tried the following in action, but I want to hear whether any of you did and if the following would not work, what would:

Code:

var original_bitmap: Bitmap;
var copy_of_original_bitmap: Bitmap = new Bitmap(original_bitmap.bitmapData);

LiveDocs mention that the BitmapData being passed to a Bitmap constructor is "being referenced", which to me might suggest it cannot be used twice? There is also the BitmapData::clone() method, which I am not sure is applicable here or not.I know this is a lot of talk instead of just trying this out, but I test so much Flash Player code daily just to see "what works" (which should be documented instead by Adobe),

View 4 Replies







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