ActionScript 2.0 :: Level Adjustments On Bitmap Data Object Via PaletteMap
Jun 9, 2006
How to do level adjustments (like Photoshop levels) on a bitmapData Object using the paletteMap method. I am fine with syntax and all that, just don't understand how the channel array values are used well enough to come up with them for myself. I have read to use a palette of 0 and 1, but I am not sure what that means. The goal of this is to take a grayscale image and get sharper black and white values for it. Also, I hope to understand how to use this method better in general.
View 1 Replies
Similar Posts:
Jul 31, 2009
I'm looking for a good method to compare a single bitmap data instance against an array of stored bitmap data objects. I need to figure out how I can compare and arrive at the conclusion that the result either means that the images are of the same object/aka similar or if they are two totally different images. I tried checking threshold of the result of the compare() function but my efforts have failed so far.
View 5 Replies
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
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
May 4, 2009
Put a bitmap inside a clip linked to a class. do
[Code]...
Even more interestingly, you can make this even more perverted by doing
[Code]...
View 5 Replies
Oct 21, 2010
I'm working on a tile based game, inspiredb by tutorials from the book "the essential guide to flash games". Please have a look at [URL] -- edit: by the way, the game idea is by no means mine, but i want to replicate the old game "sensitive" from the c64 [URL] for learning purposes I want to add shadows to all objects that stand in the water. However, since I want to keep my sprite count to a minimum, I have put all objects that don't do anything in a background bitmap. The best solution I can think of is to have:
1) a background bitmap (won't change during level)
2) a background shadows bitmap (won't change during level)
3) a sprite layer
4) and a sprite shadow layer at every screen, but this seems like a lot of work for just shadows.
View 5 Replies
Aug 5, 2009
does cached a bitmatp improve speed of vector object or bitmap object?
View 1 Replies
Feb 16, 2011
I'm trying to trace the path of an object by using setPixel on the object's position every frame in a BitmapData/Bitmap pairing. These pixels aren't showing up normally and I suspect I have a fundamental misunderstanding of the BitmapData class. Here's what I'm doing:
public var contrailBase:BitmapData;
public var contrail:Bitmap;
private var contrailColor:uint;[code].....
Using this code, the red pixels don't show up. If I initialize contrailBase to 0xFF000000 instead then I get a black screen on which the red pixels DO draw, but I need the bitmap to be transparent except for the contrail. What am I doing wrong?
View 2 Replies
Sep 5, 2011
I used this call: "dataXML.APARTADO.APARTADO1.text()[j]" to acces the second level items in a XML loaded file in a for loop.Is there a way to substitute the APARTADO1 level for a variable?What I want is to access APARTADO1, APARTADO2... in the XML file with a variable. I have tried to substitute it by a variable string but it returns "null". I don't know why. If you need more information I can attach my code.
View 9 Replies
Mar 5, 2010
I have found a little FLA which demonstrates how the duplicate movie clip can be used.I tried to simplify and adjust the AS according to my needs. With some part i was successful but with some i wasn't.
i want to be able to set the beginning X position of the clips as "0" in X values. but when i assign "0" to the this._x , it naturally generates/duplicates all the clips at the same point. What I'm trying to achieve by doing this is, when the stage is scaled in means of width my clips should start to originate from the very left of the stage whatever the stage's width is.
my second question is how can i adjust the speed?When I stretch the stage width they(duplicated clips) all speed up in order to travel the whole stage in the same amount of time as they do with the initial/beginning stage width. I want the speed to stay constant whatever the distance is.
View 4 Replies
Mar 1, 2007
I'm trying to get this xml 'image_loader' (similar to kde wipes) rotation thing working for this page i'm working on. i have to make some adjustments with the path to the files according to how it is going to work on this site i'm working on. i'm not sure how or where to change the path in the actionscript to get to the path.
i've included a folder called '- example working without paths' which is to show how it is supposed to look. this works when everything is in one folder. but, when i setup the site structure the swf can't find the xml or the images to load...so i'm not really sure how to fix it. the 'root.hml' in the root folder represents the main html file that i'm using for the site.
View 1 Replies
Feb 24, 2010
I hope i'm in the correct forum to ask this. I am trying to find the application-level configuration folder for my Flash CS4 program.
I assumed it would be in C:Program FilesAdobeAdobe Flash CS4enConfigurationComponents
But it is not. Should I have such a folder? And, if so, where should it be?
Or do I need to create it myself?
View 1 Replies
Aug 13, 2009
Let's say I create a symbol of a stick figure holding a shield.Symbol 1: The Stick manSymbol 2: The ShieldSymbol 3: the Stick man holding the shield.Now, how would it be possible to place several copies of Symbol 3 on the stage while making subtle adjustments to EACH symbol 3 on the stage.Let's say I want to make each stickman slightly a different color without every single stickman taking on the same color.How could I go about making this subtle of an adjustment without effecting every instance of symbol 1 and 2 on the stage. Is this possible in flash??? It seems that flash has so much power, but I have yet to figure out how to use it all, and I sure hope something like this is possible.
View 4 Replies
Jun 3, 2009
Im trying to make a object only appear when you have collect enough coins. How could i do this?
View 2 Replies
Jun 14, 2011
I'm building a basic tile game containing 3 layers of 'tiles' image the game has a dimension of 3x3 my data array's look like this:
[Code]...
How can i load this data from an external file which is easy to edit for the level-desiners ? (and what is best to use, xml, json,?) Is is not better to just use 1 datafile instead of 3 and what is the best way to do this?
View 3 Replies
Dec 17, 2009
I'm not too sure what category this comes into, it may end up being an html/css issue not flash!I'm looking to create a flash website embedded into html. I want my flash stage height to adjust to the browser height but if the loaded flash content (images and text) height is greater then the current browser height i want the html scroll bars to appear. Each page in the website will have different heights
View 2 Replies
Jan 30, 2009
I got a music player template online and I am having trouble customizing some of the features.
1. It has a play/pause toggle button, and I have them separated, and included a stop button.
2. I wanted the volume to go up and down, instead of left and right
3. And I would like my picture to change when I hit next
[Code]...
View 0 Replies
Mar 12, 2006
So I wanted to implement this effect: [URL] but I only want the first image to appear, so pretty much without it being blurred. I also wanted it to stay a while and then dissolve. How do you do that and how do you control the speed of the animation? Once I turn up the ra, ba ... values it does slow down but restarts halfway through the animation. I also need it to stop once it ran the cycle. It should go from invisible, to visible, then stay and then dissolve.
View 4 Replies
Jul 11, 2009
I think I had this issue before I decided to try and learn mvc, which I'm doing right now. it's not a complex problem. But I can't figure it out. First, should I add swf address to my controller? that's what I think, considering it's between the view and the update. But mainly... I feel like it's just going to loop.. for instance. I add the .setValue method on a click handler. and it changes the url and everything.. grand. but during the change it fires off the change event of course.. now how can I make adjustments to my file based on the change event listener, if it's going to fire every time something in my movie sets the value?? as you can see i'm trying to use simplemvc's classes.. i'm just trying to learn though.
[Code]...
View 1 Replies
Aug 1, 2010
I've created a prototype that will copy the pixel data from a movie clip then create a JPG image from it via PHP. It works perfectly. But when the MovieClip (called mcImage) contains a Video Object loaded with a streamed FLV, it won't copy the pixel data to the Bitmap object. The image generated is white. Here's a sample code:
var oBitmap:BitmapData = new BitmapData(nW, nH, true);
var oMatrix = new Matrix();
var oColorTrans:ColorTransform = new ColorTransform();
[Code].....
View 4 Replies
Oct 24, 2011
i did a function the captures the stage and save it to bitmap datai want to display that bitmap data on a different frame what code should i do (the bitmap changes becuse the capture function triggerd alot);
View 3 Replies
Aug 5, 2010
I want to save a screenshot from my Flex app on the Webserver (LAMP). Here is the Flex code:
[Code]...
View 1 Replies
Mar 1, 2009
Is there any easy way to crop my BitmapData without converting it to Bitmap (I only want the first 300x200 pixels).
View 9 Replies
Dec 16, 2009
I have made a little drawing program for my daughter, and I have worked in the ability to save and load images that you have made. It's a simple line drawing thing, but she's 3, and it works.Whatand I'm still new with Flash and AS3) is that I can "addChild" to put the jpeg on the stage, but it's on (or over top of) the drawing area. That means that when I start to draw, I don't really add to the picture, instead, it's drawing behind it. I used the line drawing tutorial as the basis for this little app, the basic code is :
Code:
public function DrawMain(){
graphics.lineStyle(theLine,0x000000); //default to black lines
[code]....
View 2 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies
Jun 19, 2009
I am trying to do an image capture while in full screen, however the full image area is only partially captured, or the coordinates are off. In the source files you will see a few of my attempts commented off.
View 6 Replies
Sep 29, 2009
I'm trying to create sort of an eraser to remove sections of a bitmap on stage.
I have achieved this by creating a MovieClip in flash that is a circle and exporting it as a Class called Hole.
Now I use this MovieClip to erase a circle section of the image using the following.
var mat = new Matrix();
var ct = new ColorTransform();
var hole = new Hole();
mat.translate(x,y);
image.draw(hole, mat, ct, "erase");
Now what im trying to do is scale the size of the circle depending on a certain variable but no matter what I try the scale doesn't seem to change and. The size seems to stay the same as I drew it in Flash. I tried adding the following line
hole.width = hole.height = size;
I even created a class file called Hole and the size as a parameter
var hole = new Hole(200);
This didn't work either it still appeared to have the same size. I have even tried altering the scaleX and Y values with no success.
View 2 Replies
Jan 25, 2010
I am adding a bunch of bitmap data (images) inside a canvas bitmap (using copyPixel) which is added to the stage (addChild(cavasBitmap)) how can I remove a bitmap data from a canvasBitmap?
View 5 Replies
Sep 24, 2010
I have to take a snapshots form my webcam every 5 minutes. Now my script is whit a button and its working but my file have to take the picture alone and then again whitout button to send them? I saw something on the net but when I try to do it its not working.
View 1 Replies
Jan 18, 2010
Is it possible to get the bitmap data from a component using ActionScript? I dynamically load an image. onComplete I create a Flex Image component and add the loaded image to the source
[Code]...
Later I want to create a new Image component and get the bitmapData from the first Image. I have tried this canvas.getChildAt(0) Which seems to give me the Image, but I can not figure out how to get the bitmap data. canvas.getChildAt(0).bitmapData; gives me a compile error "... undefined property" how ot get the bitmap data so I can use it in my new Image component?
View 3 Replies