Hi,
In my application a canvas object have height=90 px & width =86400 px (indicating 24 hrs 1sex/pixel). The canvas is scrollable and User can add delete components in that.
Now, i want to have snapshot of whole canvas & shrink it to size 910x30 to draw taken snapshot in another canvas.
Can anybody tell me how to take snapshot of suc...
I posted this to the Adobe forums but I don't expect a good answer there. I am looking for help from someone who has done a game in flash and has encountered the same problem.
Steps to reproduce my problem:
Create simple dot DisplayObject in flash
dot.graphics.beginFill( color);
dot.graphics.drawCircle( 0, 0, 2 );
dot.graphics.endFil...
Hi!
I need to display antialiased systemfonts (because the swf filesize must be small, therefore i can't embedd fonts). So I wrote this script in order to manually antialias the text
Code:
public function renderTextField():BitmapData{
var w:int = this["mainTextField"].textWidth+10;
var h:int = this["mainTextField"].textHeight+10;...
I'm trying to load several jpeg images dynamically XML into bitmapdata object in fla. I can see them on the stage of this .swf file.
However, I load it into another .swf which is my main to call while clicking on one of menu option.
I got this error:
Error #1034: Type Coercion failed: cannot convert com::Fashion@1daf4ca1 to flash.displ...
Hello all,
I am trying to take a snapshot of the masked region of an image... so, I load my image then perform the following functions:
private function manageLoadedImage(e:Event):void
{
_bitdata = e.currentTarget.content; // get the bitmap
_bithold.addChild( _bitdata ); // add the bitmap to a sprite on the stage
_bithold...
As of right now. I have 3 objects. One BitMap that acts as my canvas. And 2 bitmapDatas. One is my buffer and another is my tiles. I am creating a tiling effect for a game. I would like to take my tile:BitMapData, and turn it into a custom object. reason being is I want each tile to be interactive. So I can click on each one. Is it possi...
I have a BitmapData object with an alpha channel. I'd like to know the fastet way to offset that alpha channel in ActionScript3 (FlashPlayer10). By offsetting I mean shifting all pixels of that channel in one direction (wrapping around the image borders) while leaving the color channels as they were.
Is there a good way to apply a such ...
I'm using the standard ActionScript blur filter to blur an image. The image will later be used as a texture map on a cylinder, i.e. it's left and right edges will meet in 3D. This looks bad because the blur filter has discontinuities at the image edges. I'd like to set it so it'll wrap around the image so that instead of truncating the f...
As of right now, I am trying to create a tiling effect for a game I am creating. I am using a tilesheet and I am loading the tiles to the sprite like so...
this.graphics.beginBitmapFill(tileImage);
this.graphics.drawRect(30, 0,tWidth ,tHeight );
var tileImage is the bitMapData. 30 is the Number of pixels to move retangle. then tWidth ...
private static var tileDir:String;
public static var tileImage:BitmapData;
private static var loader:Loader;
public static var tileReady:EventDispatcher = new EventDispatcher();
public static var tileNum_perRow:Number = 3;
public static var select:selector;
public var tileNum:Numb...
in my class, if I create bitmapData like this
private var tImage:BitmapData;
public function object():void {
tImage = new BitmapData(30,30,false,0x000000);
}
I get the following error
ArgumentError: Error #2015: Invalid BitmapData.
But if I declare the varible inside the method
public function object():void {
var tIm...
Is there a way to apply a colorTransform to a BitmapData in a circle rather than in a rectangle?
Instead of erasing rectangular parts of an image by reducing the alpha channel as in the code below, I'd like to do it in circles.
_bitmap.colorTransform(new Rectangle(mouseX-d/2, mouseY-d/2, d, d),
new ColorTransform(1, 1, 1, .5, 0, 0, 0...
I was playing around with papervision3D and want to create a reflexion to a group of planes.
I load dynamically images through XML...
Using bitmapMaterial the result of reflexion doesn't appear in right order place. Does anyone know how to fix that?
ex:
pic1, pic2, pic3, pic4 (normal pics above)
pic2, pic4, pic1, pic3 (reflection appe...
I'm fading out a Bitmap in AS3 by repeatedly applying a ColorTransform every frame to its BitmapData;
_bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, .9, 0, 0, 0, 1));
When applying the apparent reverse to fade it back in I get a discoloured image.
_bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, 1.1...
Hi all -
I need to find a way to copy a masked bitmap. I have a bitmap on stage, and a user drawn sprite that acts as a mask. I need to capture/copy the masked area bitmap, maintaining the transparency created by the masking to eventually encode as a png.
I could find no documentation on how to accomplish this using copyPixels(), or an...
I’m starting a project in flash AS3 and my objective is to load any pdf file into my flash project and convert all its pages to BitmapData...
I am familiar with byteArray and I know I must access the pdf in binary level but I don’t know where to start and how to start.
I was hoping if you could give me some insight? Maybe a suggestion ...
Hi
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
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void
{
var image:Image = new Image();
image.x = 0;
im...
Hi, I met an interesting question:
load a big (4500x6000) jpeg into memory (RGBRGBRGB....) by libjpeg (cost about 200M memory)
CreateDIBitmap() to create a HBITMAP from the data
free the memory used
now I found that the process use only 5M memory at all. I wonder where is the data of the HBITMAP. (I disable pagefile)
update:
I wr...
Hi -
I have a container with masked bitmap in it. The scale and rotation of this container changes at runtime, and I need to draw the masked bitmap but cannot figure out the appropriate matrix calculations to do so.
My code works correctly to reflect position, scale, offset for centering without rotation. When rotated, the angle is cor...
I have two BitmapData objects with alpha channels. I'd like to combine them into a single one by using max(channel_image_one, channel_image_two) for each channel, including the alpha. Is there an easy way to achieve this result?
...