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


Similar Posts:


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

PHP :: Upload Bitmap Data Into MySQL Table From Flash AS3?

Dec 1, 2010

Basically, I want a sample php script, that can let me call from Flash, to save a bitmap data as a record into a mysql table!

View 1 Replies

ActionScript 3.0 :: Xml Zip Code Lookup?

Jun 26, 2009

I'm loading an xml file that contains nothing more than a list of "valid" zip codes.  Here's a sample of the xml:
 
=================================================
zipCodes.xml
=================================================
<?xml version="1.0" encoding="ISO-8859-1"?><zipCodes><zip>82930</zip><zip>82931</zip><zip>83114</zip><zip>83201</zip><zip>83202</zip><zip>83203</zip><zip>83204</zip><zip>83205</zip><zip>83206</zip><zip>83209</zip><zip>83210</zip><zip>83211</zip><zip>83212</zip><zip>83213</zip><zip>83214</zip><zip>83215</zip><zip>83217</zip>...and so on.

[code]....

View 7 Replies

Flash :: Flex - DNS Lookup Be Made With AS3?

Aug 10, 2009

Can a DNS lookup be made with AS3?

View 2 Replies

Flash :: Lookup Exchanged Data Between PHP?

Jun 29, 2011

I'ld like to see the data that is exchanged between a Flash based web app and PHP. What is the tool of choice for that?

View 2 Replies

Flex :: Entity Container Lookup Columns?

Feb 22, 2011

I am successfully using an Entity Container to allow users to enter a new contactIs there any way to control what columns are shown when the user searches for an Account Name? At the moment 5 columns are shown, but I would like to display different columns and change the display order.

View 1 Replies

IDE :: Make A Table In Flash And Enable The Column Headers On The Table To Sort Column On Click?

May 4, 2009

How to make a table in Flash and enable the column headers on the table to sort column on click?I have seen some tutorials with mySQL but I'd like to start with something basic. Is a sortable table possible using just Flash and AS 2.0?

View 1 Replies

Java :: Duplicate Session Error When Perform Proxy Lookup

Oct 5, 2011

We have deployed a flex application on Tomcat and it uses Blaze-DS to communicate with the Java side. However when using the deployed application we constantly get the error:Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly. url...Within our Apache httpd.conf we have set up a proxy lookup so that rather than using particular ports (e.g 8082) we want to use port 80 (some of our customers operate in a locked-down environment).[code]

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 :: 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 :: 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 2.0 :: Shifting What MC Is In Front Of The Others?

Apr 25, 2011

I am currently building a commercial website, and am stuck on the functionality of a 'Featured Businesses' animated graphic. The functionality is there, it works, but the problem is, I can't figure out a proper way to make it so that when one button is pressed (that is behind the others on the timeframe), how can I make it so that all the frames/layers (which contain the other buttons) go behind whatever button is activated?

As I said, it works, the problem is that all but the last button (which is the top layer) are obscured from view by the other buttons/MC's that are on top of it as far as the timeline is concerned.!

I tried messing around with the objectdestroy function, but this is my first foray back into ActionScripting since I scripted my last 2D platformer way back in 2005 when I was using Flash MX and before Adobe took control. So I'm rusty.

The link below should contain the .swf of the functional graphic. As you can see it works, but the top buttons are behind the others, so you can't see their animation fully.=

View 1 Replies

ActionScript 2.0 :: Shifting A Sprite Via A Button?

Feb 19, 2007

im currently workin on a game in my spare time and have come across a few problems. I've gone back to basics to figure out a redesign of my code using functions.

Here's my initial problem:

I have a button, which when pressed will shift a sprite 100px to the right. I wanted it so that everytime i pressed the button, the sprite moved a further 100px from it's stopped location. So basically if it's moving and you push the button again, it'll do nothing. It has to be stationary in order to move. At the moment my code shifts the sprite when the button is pressed, but it just keeps moving forever and doesn't stop

[Code]....

View 2 Replies

IDE :: Shifting Of Movieclip Containing Static Text/same Xy?

Mar 2, 2009

I have an odd situation where the static text each within a mc for a menu are shifting slightly up and down despite having the exact same rounded x/y values throughout on the timeline in the properties box. There are a few frames on the timeline where they are contained within another movieclip to fade them in, and when I zoom in and make sure they line up exactly, they are fine, but when I play the movie back at various magnifications within the authoring environment and as an exported swf, they randomly shift slightly. Sometimes they randomly shift, and other times at the same magnification they don't at all when replayed back again. It's making me pull my hair out and grind my teeth because I don't know if I am dealing with a known bug or (more likely) my ignorance. I know there is a better way of doing this all with action script, but honestly I am not there yet by a long shot, unless someone could direct me to a proper tutorial.

View 5 Replies

ActionScript 3.0 :: Math.floor Vs Bit Shifting Vs Int

Aug 17, 2009

I just ran some tests on round numbers.In preparation for getting max performance from AS3, I want to test as many areas as possible.All I did was generate a rounded random number a million times per frame, and record the time step in milliseconds.[code]Now the strangest part is having a non rounded random number generated a million times per frame netted an average time of 195 milliseconds, faster than using int as a random number. It must simply be that because Math.random isn't returning an integer, some form of conversion of taking place for your variable to be an integer.

Incidentally, using a Number instead of integer for the looping variable decreased performance minimally, just a few milliseconds.So simply having your variable as an integer, and using no rounding at all produces the fastest results if you want a round number.Remember though, there are many other areas in Flash to dramatically increase performance. Being that we're talking about a million iterations per frame, the difference in performance is not exactly dramatic here. One is not even twice as fast as another, over a million iterations.

View 5 Replies

Flash :: IDE - Text Spacing / Shifting In Cs4?

Dec 30, 2009

I am new to the forum, I have used Flash MX 2004 for quite a while and had never had this problem, recently I gave my site a "facelift" in CS4 and I got it exactly how I wanted it, I exported the swf file and saved the flash file. That was a few days ago, Today I wanted to add a new piece to my portfolio so I opened the same exact file today and everything had shifted! SOOOO FRUSTRATING as I felt I had finally achieved what I wanted to. This is the one I was really happy with:

[Code]...

View 3 Replies

ActionScript 3.0 :: Loading MovieClips From The Library With Dynamic "lookup"

Nov 22, 2009

I have a row of thumbnails with photos of people. When I move the mouse over each photo I want to load an "information card" about each person onto the stage. I have the card for each person as separate MovieClips in the library, named Card_person1, Card_person2, ...

In each thumbnail I have a property wich contains the name of that person, called "namn".

Now, I was thinking I could attach the same listener to all thumbnails:

ActionScript Code:
thumb1.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
thumb2.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);

[Code].....

This doesn't work. Is there someway to make it work? Should I be doing it some other way? Or do I have to make a hard coded function to load each Card/MC in the library?

View 2 Replies

ActionScript 2.0 :: Flag Wave Fade In Keeps Shifting

Nov 10, 2008

I've been trying to piece together a way to have an image with a flag wave fade in as soon as the movie loads. Once the image is faded in almost all the way, I want the waving to slow to a stop so at the end, it's a static image. I've gotten most of this accomplished, however, once the flag wave slows and stops, the entire image shifts up and to the right. I'm sure it has something to do with some displacement variable, but since I'm no coder I can't seem to figure out how to stop this.[code]...

View 1 Replies

ActionScript 2.0 :: Toggle All Variable, With Shifting Variables?

Jul 27, 2010

I am dynamically creating a bunch of buttons which each toggle their variable on and off, causing corresponding graphics to hide.I also want to have a toggle All on and off button that affects all the variables.I can't seem to get my head around the best approach to turning all the individual variables on/off when I don't really know what those variables will be yet, cause it will depend on how each version of this gets set up.

View 2 Replies

Media Server :: Dynamic Video Shifting?

Jul 4, 2009

I'm creating a custom video player where the user can select to play the same video at different speeds (100%, 75%, and 50%).We have rendered 3 different MP4 files,one for each speed, and then there is a mechanism in the video player to load each video as the user demands it.It works fine so far, except that when a new video loads,it begins to play from the beginning, not at the point where the previous video left off (which is crucial).

I thought it would be as simple as using either ns.play("videoname", videotime) or using a ns.seek(videotime), but in ether case,the new video still will only play from the beginning.Here is the code, which includes some calculation for adjust the time depending on the shift from 100%, 75%, and 50%.

function switchSpeedVideo() {
var currentTime:Number = ns.time;
output.text = currentTime.toString(); // outputs correctly[code].....

What is missing here?Currently, I am using HTTP connection("HTTP Pseudo Streaming" with Wowza on SimpleCDN).Does this require RTMP?

View 3 Replies

Fonts Shifting In Snow Leopard Flash CS4

Sep 21, 2009

We have noticed Fonts shift down in our layouts. Our files are very messed up. One particular font that is doing this is TheMix. Anyone else have this happening? The same file opens and displays just fine under Leopard.

View 2 Replies

Flash - Regarding Fullscreen Color-shifting Gradient?

Jun 30, 2010

how to set up 2 pre selected colors to tween a gradient to instead of "random" ones. My Goal would be to use this class as a dynamic background creater and i would like to have different gradient backgrounds on different pages.

View 1 Replies

ActionScript 2.0 :: XML Driven Navigation - Shifting Y Position

May 18, 2010

I have a simple xml driven navigation comprising of 8 items. How I could move the items up if clicked e.g if nav item 3 is clicked, 3,4,5,6,7 and 8 move upwards (so that 3 is at a Y position of 0), and nav item 1 and 2 drop to bottom of nav list?

3
4
5
6
7
8
1
2

View 9 Replies

ActionScript 2.0 :: Shifting The Movie Clip To Other Side

Oct 18, 2006

Is there a way of scrolling (shifting) a movie clip so that a part of it continuously shifts to the other side, i.e. when you scroll the movie clip to the left, the portion that scrolled out appears on the right (like a picture on a rotating drum). Of course in AS 2.0

View 7 Replies

ActionScript 3.0 :: Create Drag/drop Shifting Items?

Jan 19, 2010

What would be a good way to create a grid of images in which one can be dragged to a new position and the other images will shift to make room for the image dragged? Looking at making a little program that will reorder an XML file by visually dragging the items to where I want them.

View 0 Replies

ActionScript 3.0 :: Extract Sound From A Video For Pitch Shifting?

Jan 4, 2011

any thoughts on how to extract the audio from a movie? Pitch shifting is do-able to this article:But the code uses the Sound class.I've NO idea how to go about extracting the audio from a movie/FLVPlayback

View 5 Replies







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