ActionScript 2.0 :: Getpixel Value Of A Pixel In Stage?

Oct 15, 2008

I want to getpixel value of a pixel in Stage. Stage is dynamically created and its have movieclips or images, thats are all dynamically created,

But Now I need to get a pixel color value of (150,150) in the stage,

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Inaccurate Pixel Values Using GetPixel?

Sep 18, 2008

I'm writing an applicaton which acts based on different colour values of pixels in a png image created in Microsoft paint. However, when I load the image into a BitmapData object, and then parse through the pixels reading their values using getPixel() or getPixel32() (I've tried both) I seem to be getting values which are slightly inaccurate compared to what was saved. For example a pure white pixel which should be read as 0xFFFFFFFF often comes out as 0xFFFFFFFE. The behaviour of the program is dependent on the exact value of the pixel so these errors usually break it.

Sometimes the problem is intermittent so seems fixed but actually isn't. Is it to do with the PNG format? I thouht png was lossless so should deliver accurate pixel values at all times?

View 5 Replies

Professional :: Add A 1 Pixel Border Around Stage?

Nov 21, 2010

add a 1 pixel border around the entire stage so it appears in swf?

View 3 Replies

ActionScript 3.0 :: Get Color Of A Pixel On Stage?

Jun 8, 2011

Is there a way to retrieve the color of a generic pixel on the screen using the mouse pointer inside the Stage of Flash Player? With the getPixel method of the BitmapData class you can get the color of a pixel only if the mouse is over a bitmap image, but what if I need the color a generic pixel on the screen?

View 4 Replies

Make A Stage Resolution In 6800x768 Pixel?

Aug 26, 2010

I am trying to make a panorama presentation (running across 5 screens of 1360x768 pixels each) and therefore I would like to make a stage resolution in 6800x768.

Flash CS4 Pro says no: max resolution 2880x2880 pixels. Is it in any kind of way possible to make a work around so I will be able to get the requested resolution for my panorama animation/presentatrion.

View 1 Replies

ActionScript 3.0 :: Custom TweenLite Function - Stage Pixel Precision

Oct 17, 2010

I am doing a custom function like TweenLite.to, but there is one problem. I cast that function on many objects. And they all move a little bit differently. It only happens when I don't do Math.Round(bonus_move). If I use numbers for example 0.58. It moves every stage child differently on about - 0.05.

Here's my function:
Code:
Select allpublic function moveTo(child, speed, px, py){
// configurable
var movement_accuracy = 20;
var delay_duration = 2/(movement_accuracy/10) ;
var movement:Timer = new Timer(speed*12.5*delay_duration, movement_accuracy);
movement.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void{
[Code] .....

View 1 Replies

ActionScript 2.0 :: Pixel Effect - Position Shape At Random Place On Stage

Apr 13, 2006

I am trying to make a so called pixel effect in witch I want to make a shape only from pixels that are positioned in some random place on the stage. And all these pixels move to a certain point and create that shape. I've been looking into BitmapData Class but I don't now if that is the best way to do it.

View 2 Replies

Flex :: Comparing Bitmap Data In AS3 Pixel For Pixel

Mar 30, 2010

I am looking for a fairly simple image comparison method in AS3. I have taken an image from a web cam (with no subject) passed it in to bitmap data, then a second image is taken (this time with a subject) to compare this data, from these two images I would like to create a mask from the pixels that match on both bitmaps. I have been scratching my head for a while, and I am not really making any progress. Could any one point me in the right direction for pixel comparison method, something like getPixel32()

View 2 Replies

Professional :: Ecard Suggested Stage Size - What Optimal Pixel Dimensions Would Be For Ecards To Run On Multiple Platforms

Feb 15, 2011

I have one that's almost done and the stage size is 700x800 px. But I'm starting to worry if that's going to look too small? To change it, will be a lot of work - there's animation, imported Jpegs etc. As far as I can tell, in order for it to look correct in larger dimensions I will need to basically create it again from the ground up. So, I'd really like to get an idea of what the optimal pixel dimensions would be for ecards to run on multiple platforms.

I really want to do this and I don't feel like I can move ahead until I get the viewing size correct. I don't even mind redoing the card. I just want my future cards to be the correct size. I don't want to have to come back and redo them all. By the way, the cards are being made in Flash. The site itself will be created in DreamWeaver.

View 8 Replies

ActionScript 3.0 :: Get Pixel-by-pixel Bitmap Data?

Nov 23, 2009

I have a 100x100px image. I want to get 1 pixel vertical line from x- 1 to 100. How can I do that?

View 7 Replies

Flex :: GetPixel Method - How To Get R Value Of RGB

Nov 15, 2009

I have a greyscale image and I want to scan the pixels out of the Image and this is what I get :
var i:int;
var j:int;
for (i = 0; i < img.contentWidth ; i++) {
for(j = 0; j < img.contentHeight; j++){
pixeldaten.addItem({x:i,y:j,pixel:bmd.getPixel(i,j)});
}}
But the table doesn't look like RGB Values . (R , B , and G must be the same).

View 1 Replies

ActionScript 2.0 :: GetPixel To RGB Values

Feb 14, 2007

So, I'm using the BitmapData class and getPixel to retrieve the colour of a pixel. It works fine and returns a number like "16706965". I'm not sure what kind of value this is? If I place a 'toString(16)' on the end of it, I get a HEX value, but sometimes it isnt 6 digits long, sometimes 5 sometimes 4, so I can't just convert it from HEX to RGB.

I can make this number into a string with 6 digits, but then it doesnt recognise when I try to convert it to RGB

View 3 Replies

ActionScript 3.0 :: Using .getPixel() To Read Through A MovieClip?

Oct 15, 2009

I have two images, one overlayed exactly over the other. The image in front is what the user needs to see, but the user behind can be considered to be like a map with different fields of color on it representing different things.
 
What I am trying to do is that when the user mouses over the image, it reads (via .getPixel) the color info of the image behind which prompts certain messages to be displayed.
 
I am not having a problem with getting .getPixel() to work since when I just have the behind image (colored "map") showing, the color data for each pixel comes up as expected. But, when I overlay the top image, it shields the back image from being able to be "read" by my .getPixel function.
 
Is there a way to have a movieClip not "interfere" with movieClips that lay behind it in the stack?

View 1 Replies

ActionScript 2.0 :: Convert MC To Bitmap To Use GetPixel

Jan 22, 2010

I am having a few issues converting a MC to a bitmap. I have succeeded in loading a graphic from the library, loading that as a bitmap and I can use getPixel to get the color at a certain x,y point.BUT I have another part to the problem. I have a file upload where a user can upload an image and choose a color off that logo. So I have the logo uploading, then getting loaded into an MC on the stage and it all works honky dory.However, when I (thought) I was converting it to bitmap and then use getPixel, every part of it is just returning white.[code]But no matter what co-ordinates I put in, I always get white.

View 7 Replies

ActionScript 3.0 :: .getPixel() Returning Incorrect Hex Color Value?

Oct 15, 2009

(1) read in a *.png image(2) when the user mouses over the movieclip that contains the image, an RGB value (in 0xFFFFFF format) of the pixel which the mouse is currently hovering over is displayed.Here is what I am doing to try and make it happen:(1) Using the loader class (imageLoader) to load a bitmap (*.png -- no alpha) into a movieclip.(2) Also taking the "imageLoader.conent" and placing it into a "grainImage:Bitmap" object.(3) Using a timer event to fire off data describing the where the mouse is at all times.function readPixelColor(te:TimerEvent):void { trace(grainImage.bitmapData.getPixel(mouseX, mouseY).toString(16));};How can one insert code in these Forums? I used to be able to do that... Oh well, the problem that is happening is that the value that is being returned by this function is off by 010101 (I believe, not certain how hexidecimal works).

Anyway, if the color is really "336699" (as confirmed in Photoshop) my function returns "326598". Which is "336699" minus "010101"why this may be doing this? Are my values "shifted" in some way since there is no alpha? Maybe there is some sillyness behind loading the image into a _mc and also placing the loader content into a bitmap object -- they are interfering with each other in some way?

View 4 Replies

ActionScript 1/2 :: GetPixel Of Dynamically Loaded Image

Mar 2, 2011

I'm trying to create a color picker using getPixel. It works wonderfully as long as the image is loaded from a local drive. When I try loading it from the server (a subdirectory on the same server as the SWF), the loaded image doesn't get drawn when I use the draw command. It draws a white rectangle and when I use getPixel, I always get 0xFFFFFF. I also have system.Security.allowDomain("[URL]") in my script, but nothing works.

View 6 Replies

Flash :: Determine If GetPixel() Value Is Greater Than Or Less Than 50% Gray?

Mar 28, 2010

I am trying to loop through a bitmap and determine if each pixel is lighter or darker than gray using getPixel(). Problem is, I am not sure how to tell whether the value returned by getPixel() is darker or lighter than gray.

Neutral gray is about 0x808080 or R:127, G:127, B:127. How would I need to modify the code below to accurately determine this?

[Code]...

View 2 Replies

ActionScript 2.0 :: Using GetPixel To Send An Encoded Email?

Jan 11, 2012

I've created a simple drag-and-drop dress-up game. The aim is that users will create a monster by dragging and dropping, and that an image of that monster will be sent to me, and I will create a toy that looks like the monster.

So once users are happy with the final look, and have filled in their details on the page, I would like them to be able to click a button that will send me the encoded jpeg of how the swf currently looks. I could then recreate the image using image magick or something similar, I guess?

I realise that this may require PHP, but as I have never used it before I thought that perhaps it may be possible to use getpixel to get an encoded text string of the stage and then send that to myself via "mailto"?

View 0 Replies

ActionScript 3.0 :: BitmapData Mapping To Scaled Movieclip Then GetPixel?

Aug 18, 2009

I'm building an application where the user can upload a photo of their head, scale it and position it, and then pick a colour from the photo.The photo gets put into a movieclip called 'head'I'm stuck at the colour picker part and I just can't seem to work out the whole bitmapData thing. Here's my colour picker code -

ActionScript Code:
private function beginColourPick():void
{
_bmd = new BitmapData(head.width, head.height);

[code]...

This code kind of works, but not correctly.

Problem #1: The colour picker only works in the bottom right quarter of the image because I moved the head mc so the registration point is bang in the middle. So the problem here is that I can't figure out how to move the bitmapData in line with the head mc.

Problem #2: If the user scales the head mc (even a tiny bit) the colour picker stops working altogether. Now I'm thinking I've got to use a transform matrix - but I read up on it and haven't got anywhere.

View 7 Replies

Professional :: BitmapData / GetPixel Mystery - Works Perfectly On Local, Failing When Uploaded?

Dec 13, 2010

I'm working with a video in Flash where I am capturing each frame and testing the color of a single pixel. I'm using it to determine when a white/transparent background changes to be a color. The following AS2 code works flawlessly when I preview it in Flash and on my desktop in the browser (the direct SWF and placed inside HTML using SWFObject) but as soon as I upload it to my server it fails and produces "FFFFFF" continuously regardless.

this.onEnterFrame = function()[code]..........

There is no difference in the files; they are both pulling from the same video source (hosted on an Flash FLV server).The only difference is one set of files is hosted on my local computer and the other is hosted on my web server.

View 2 Replies

ActionScript 2.0 :: Get Colour Of Pixel In Mc?

Jul 14, 2009

I want to take the colour of a certain pixel in a movieclip and make the colour of another movieclip that colour. How do I do that?

View 1 Replies

Pixel Coordiante Of The End Of Text?

Oct 14, 2011

I have a label and I need the pixel value of the end of the text of the label. I will later later need to set a icon in fronto f the end of the text. I tried label id.x and y but it seems not working. Also for some reason when I do something like <label id>.x+5 it gives me a implicit coercion error...not sure why?

View 2 Replies

ActionScript 2.0 :: Get Whole Pixel Values?

Jan 25, 2005

I was wondering what the code to get something to go to a whole pixel value is. I'm using pixel fonts inside of a movieclip and when the movie clip is moved through actionscript and lands in a different spot with easing, the fonts look bad because i suspect that they are no longer on pixel values.

View 9 Replies

ActionScript 2.0 :: Pixel Variation On Mac And Pc?

May 31, 2007

I made a menu by attaching movieclips and specifying the text as a variabel. the main movieclip is called meny, then I attach the movieclips txt and pil (pil is norwegian for arrow) inside it, and specify the y pos. This works on my mac, but when I see it on a PC the text is down by aprox. 5-8 pixels.

[Code]....

View 6 Replies

ActionScript 3.0 :: Get SWF Pixel Dimensions?

May 19, 2010

How do I programatically get the pixel dimensions of my SWF. I tried using stage.width and stage.height, but this seems to be a tight bounding box on all the objects in the video, not the actual viewing area. I also want these pixel dimensions to be accurate as javascript dynamically resizes this SWF.

View 2 Replies

ActionScript 2.0 :: CS3 Pixel Fonts Blurred With IE8

Jun 18, 2009

I have a Flash CS3 movie (AS2) wich uses pixel fonts. The text is within a movie clip that uses the tween class to move with ease. Whe I publish it, everything OK, the text looks very crispy. But I want this movie to be centered in the browser window so I've used the tags <center> </center> in the html file as you can see below. When you play the movie it plays in the center but... with IE8 the text is blurred if the browser window is maximize, but crispy if you minimize the window!! With other browsers it works well with all windows sizes, IE7, Firefox, Safari...

Here is an exemple: [URL]

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test2</title>

[Code].....

View 2 Replies

ActionScript 3.0 :: Check Pixel Transparency?

Aug 4, 2009

I am trying to get the alpha values in the rect of one (playball_mc) clip inside another bigger clip (dst_mc). The clip dst_mc has a bitmap attatched and also has a shaderFilter that calculates the alpha values.ut I only get alpha values of 0xFF.Does anyone know what I am doing wrong or where the alpha value gets lost?

CODE:var rSource:Rectangle=new Rectangle(playball_mc.x,playball_mc.y,80,80)
dst_bmp.draw(dst_mc);bmd1.copyPixels( dst_bmp , rSource, new Point(0,0) );
for

[code]........

View 9 Replies

ActionScript 3.0 :: Get Vector Pixel Color?

Oct 28, 2010

Grab the color of a vector item at a specific pixel without converting it to a bitmap object and then using getPixel?

View 8 Replies

Professional :: Pixel Perfect Hit Test?

Nov 13, 2011

What is the SIMPLEST way to make a pixel perfect hit test class?

View 41 Replies

Large Pixel File Yet It Gets Cut Off When I Preview It

Feb 11, 2012

I have a large pixel file yet it gets cut off when I preview it. Why?

View 1 Replies







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