Search Results

Search found 118 results on 5 pages for 'bitmapdata'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • [AS3] BitmapData cut-off

    - by Fristi
    Hello, I am writing a MovieClip rasterizer which rasterizes all the frames in the specified movieclip. Here's the code for rasterizing: for ( var i:int = start; i <= end; i++ ) { //goto the next frame clip.gotoAndStop( i ); //get the bounds bounds = clip.getBounds(clip); //create a new bitmapdata container bitmapData = new BitmapData( transformer.width == -1 ? bounds.width : transformer.width, transformer.height == -1 ? bounds.height : transformer.height, transformer.transparent, transformer.color ); //rotate the clip if (clip.rotation != 0) transformer.rotate( clip.rotation * (Math.PI / 180) ); //scale the clip if (clip.scaleX != 1 || clip.scaleY != 1) transformer.scale( clip.scaleX, clip.scaleY ); //translate the movieclip to its zero point if (transformer.matrix.tx == 0 && transformer.matrix.ty == 0) transformer.translateToZero( bounds ); //draw the bitmap data with the transformers bitmapData.draw( this._source, transformer.matrix, transformer.colorTransform, transformer.blendMode, transformer.clipRect, //new Rectangle(0, 0, bounds.width, bounds.height), transformer.smoothing ); //push the data on the array frames.push( bitmapData ); } Now the result is different - http://i42.tinypic.com/lfv52.jpg - (note the head and left shoe). Anyone knows what the problem is? I've seen people adding 'extra' pixels to their boundary box at the BitmapData constructor, but thats nasty imo.

    Read the article

  • Placement coordinates of bitmapData in AS3

    - by TheDarkIn1978
    i've programatically created a vector graphic (rect), repositioned the graphic, and set up an MOUSE_MOVE eventListener to trace color information of the graphic using getPixel(). however, the bitmapData is placed at 0,0 of the stage and i don't know how to move it so that it matches the graphic's location. var coloredSquare:Sprite = new GradientRect(200, 200, 0xFFFFFF, 0x000000, 0xFF0000, 0xFFFF00); coloredSquare.x = 100; addChild(coloredSquare); var coloredSquareBitmap:BitmapData = new BitmapData(coloredSquare.width, coloredSquare.height, true, 0); coloredSquareBitmap.draw(coloredSquare); coloredSquare.addEventListener(MouseEvent.MOUSE_MOVE, readColor); function readColor(evt:Event):void { var pixelValue:uint = coloredSquare.getPixel(mouseX, mouseY); trace(pixelValue.toString(16)); }

    Read the article

  • Trying to capture stage area using BitmapData

    - by Dimitree
    I am trying to grab part of stage area using BitmapData and copyPixels method: bmd = new BitmapData(stage.stageWidth, stage.stageHeight); bmdRect = new BitmapData(320, 240); rectangle = new Rectangle(360, 20, 320, 240); bmdRect.copyPixels(bmd, rectangle, new Point()); bmd.draw(bmp); bmp = new Bitmap(bmdRect); var myEncoder:JPGEncoder = new JPGEncoder(100); var byteArray:ByteArray = myEncoder.encode(bmd); The result i get is an empty .jpg I m pretty sure that the error is in the Bitmap procedure and not the saving one...

    Read the article

  • pdf read pages to BitmapData in AS3

    - by Hadi
    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 to an already library that is doing a similar work? Any idea os appreciated just to get me started...

    Read the article

  • Faking Display tree (Sprite) parent child relationships with rasters (BitmapData) in ActionScript 3

    - by Arthur Wulf White
    I am working with Rasters (bitmapData) and blliting (copypixels) in a 2d-game in actionscript 3. I like how you can move a sprite and it moves all it's children, and you can simultaneously move the children creating an interesting visual effect. I do not want to use rotation or scaling however cause I do not know how that can be done without hampering with performance. So I'm not simulating Sprite parent-child behavior and sticking to the movement on the (x, y) axis. What I am planning to do is create a class called RasterContainer which extends bitmapData that has a vector of children of type Raster(extending bitmapData), now I am planning to implement recursive rendering in RasterContainer, that basically copyPixels every child, only changing their (x, y) offset to reflect their parent's offset. My question is, has this been implemented in an existing framework? Is this a good plan? Do I expect a serious performance hit for using recursive methods this way?

    Read the article

  • ActionScript BitmapData Built-in To Bitmaps?

    - by TheDarkIn1978
    i've used a Loader and URLRequest to download a .png from the internet and add it to my display list. since it's already a bitmap, does it have built in bitmap data already? or do i have to create the bitmap data myself? also, why does the same trace statement return false in the mouseMoveHandler when it outputs true in the displayImage function? var imageLoader:Loader = new Loader(); imageLoader.load(new URLRequest("http://somewebsite.com/image.png")); imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, displayImage); function displayImage(evt:Event):void { addChild(evt.target.content); addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); trace(evt.target.content is Bitmap); //outputs 'true' } function mouseMoveHandler(evt:MouseEvent):void { trace(evt.target.content is Bitmap); //outputs 'false' }

    Read the article

  • Actionscript 3: How to remove all black pixels from BitmapData ?

    - by Adnan Doric
    Hello, Let say I have a BitmapData with different pixels representing an object, and some black pixels around it that I want to remove. I would like to obtain a new BitmapData, with width and height of the object represented by non-black pixels. For example, let say I have a BitmapData 400x400px, but the object represented by non-black pixels occupies the rect: x=100, y=100, width=200, height=200. I want to get new BitmapData representing that rect, all black pixels should be removed. Any idea on how to do this please ?

    Read the article

  • ArgumentError: Error #2015: Invalid BitmapData.

    - by numerical25
    I am having problems loading a bitmapData. I am getting the following error Engine Init //trace loadimage//trace ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData() Below is my code. it appears it happens after the trace loadimage package com.objects { import flash.display.Sprite; import flash.display.BitmapData; import flash.display.Bitmap; import flash.geom.Point; import flash.geom.Rectangle; import flash.display.Loader; import flash.net.URLRequest; import flash.net.*; import flash.events.*; import flash.display.LoaderInfo; public class gameObject extends Sprite { protected var w:Number; protected var h:Number; protected var image:BitmapData; protected var canvas:Bitmap; protected var px:Number; protected var py:Number; public function gameObject():void { init(); } private function init():void { } public function loadImage(imageDir:String, w:Number, h:Number, px:Number, py:Number):void { this.w = w; this.y = y; this.px = px; this.py = py; trace("loadimage"); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,imageComplete); loader.load(new URLRequest(imageDir)); } private function imageComplete(e:Event):void { var loader:LoaderInfo = LoaderInfo(e.target); image = Bitmap(loader.content).bitmapData; drawImage(); } private function drawImage():void { var tilePoint:Point = new Point(0,0); var tileRect = new Rectangle(py,px,w,h); trace(loader.content); var canvasData:BitmapData = new BitmapData(w,h); trace("got canvas data"); canvasData.copyPixels(image,tileRect,tilePoint); trace("copied pixels"); canvas = new Bitmap(canvasData); } } } And my call the the method is like so balls = new Array(); balls[0] = new gameObject(); balls[0].loadImage("com/images/ball.gif", 15,15,0,0); When I trace the Loader.content, below is what shows Engine Init loadimage [object Bitmap] ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData()

    Read the article

  • invalidArgumentError: Error #2015: Invalid BitmapData

    - by Arif
    the error is ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData/get width() recently i write code in flex to upload a image in canvas and modify it. first i convert the image bitmapdata then use it. but problem is after upload some image the above error display. the process can't get the width or height of bitmapdata. How can i solve this?

    Read the article

  • EOF error encountered while converting bytearray to bitmapdata

    - by intoTHEwild
    I am using var bitmapdata:BitmapData=new BitmapData(); var pixels:Bytearray=new Bytearray(); pixels = rleDecodePixles(); bitmapdata.setPixels(bitmapdata.rect, pixels); In the 4th line in the code above i am getting "Error: Error #2030: End of file was encountered." I checked the length of the pixels object which is 4 times the width*height of the rect object. Given that setPixels() functions reads unsigned int from bytearray and sets that value to pixels, I think it should work. But I have no clue why this wont work. The pixels object is filled after RLE decoding of the data which i get from a server. Is there any work around or any other method which I could try to use. The loader class wont work as the data that I get from the server is not in any of the recognized format. Any help is greatly appreciated. Shrikant Thanks.

    Read the article

  • How to continuously fade a BitmapData to a certain color?

    - by Cay
    I'm drawing stuff on a bitmapData and I need to continuously fade every pixel to 0x808080 while still drawing (its for a DisplacementMapFilter)... I think this illustrates my problem: http://www.ventdaval.com/lab/grey.swf The simpler approach I tried was drawing a semi-transparent grey box on it, but it never reaches a single color (i.e. 0x808081 will never be turned to 0x808080)... The same kind of thing happens with a ColorMatrixFilter trying to progressively reduce the saturation and/or contrast. (the example above is applying a filter with -10 contrast every frame). I'm trying paletteMap now, and I'm sensing this could be the way to go, but I haven't been able to get it... any ideas?

    Read the article

  • Handling inverted pixels in bitmapData and bitmap class in as3

    - by intoTHEwild
    I am using bitmapData and bitmap classes to render a mouse cursor on the display screen. The bitmapData consists of an area whose colors should be inverted according to the background color. This is a very basic thing which could be observed with text cursor(the vertical line with two small horizontals on top and bottom), when moved over the text area. I want to be able to do the same with the pixels in my bitmapData, is there a way to find out the background color effectively and invert the color values? In this process i will be redrawing the whole pixels, is there any other efficient way to do that ?

    Read the article

  • Generating Source Info For Flex BitmapData.

    - by Joshua
    Instead of populating the BitmapData class from an IMAGE. I would like to (within Actionscript) GENERATE some new BitmapData by capturing the Bitmap representing say, a TextArea component on the stage. In other words, sort of take a "screen capture" or "screenshot" of one of the components, and convert that into an image. Am I silly to even wonder if such a thing is feasible? Can an Air/Flex app "look at itself" in this way? Can it turn a datagrid or a canvas or a textinput into the corresponding image AS IF via screen capture? Even a hint in the right direction would be appreciated, Thanks In Advance.

    Read the article

  • Flex/Actionscript image display problem.

    - by IanH
    I'm trying to extend the Image class but hit a problem that I can't get past. I have a private image (img) that loads an image and a function that takes that image and copies it onto the parent. The debug function "copyit2" displays the image fine (so I know it's loaded OK). But the function "copyit" doesn't work - it just displays a white rectangle. I can't see how to make copyit work so that the original image is copied to the BitmapData and then subsequenty copied onto the parent? (The idea is to do some processing on the Bitmap data before it is displayed, although this isn't shown here to keep the example simple.) I suspect it is something to do with the security of loading images, but I'm loading it from the same server as the application is run from - so this shouldn't be a problem? Thanks for any help anyone can provide. Ian package zoomapackage { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.events.MouseEvent; import flash.geom.Matrix; import flash.geom.Point; import flash.geom.Rectangle; import flash.net.*; import mx.controls.Image; import mx.events.FlexEvent; public dynamic class Zooma extends Image { private var img:Image; public function copyit():void { var imgObj:BitmapData = new BitmapData(img.content.width, img.content.height, false); imgObj.draw(img); var matrix:Matrix = new Matrix(); this.graphics.beginBitmapFill(imgObj, matrix, false,true); this.graphics.drawRect(0, 0, this.width , this.height); this.graphics.endFill(); } public function copyit2():void { this.source = img.source; } public function Zooma() { super(); img = new Image(); img.load("http://localhost/Koala.jpg"); } } }

    Read the article

  • Bitmapdata heavy usage - memory disaster (spark/FB4)

    - by keyle
    I've got a flex component which works pretty well but unfortunately turns into a disaster once used in a datagroup item renderer of about 40-50 items. Essentially it uses bitmapdata to take screenshot of a fully-rendered webpage in mx:HTML (this version of webkit rocks btw, miles better than flex 3). The code is pretty self-explanatory I think. http://noben.org/show/PageGrabber.mxml I've optimized it all I could, browsed, search for answers and already trimmed it down a lot, I'm desparate to reduce the memory usage (about 600mb after 100 draw) The Garbage collector has little effect. Thanks! Nic

    Read the article

  • Flex List ItemRenderer with image looses BitmapData when scrolling

    - by Dominik
    Hi i have a mx:List with a DataProvider. This data Provider is a ArrayCollection if FotoItems public class FotoItem extends EventDispatcher { [Bindable] public var data:Bitmap; [Bindable] public var id:int; [Bindable] public var duration:Number; public function FotoItem(data:Bitmap, id:int, duration:Number, target:IEventDispatcher=null) { super(target); this.data = data; this.id = id; this.duration = duration; } } my itemRenderer looks like this: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; ]]> </fx:Script> <s:Label text="index"/> <mx:Image source="{data.data}" maxHeight="100" maxWidth="100"/> <s:Label text="Duration: {data.duration}ms"/> <s:Label text="ID: {data.id}"/> </mx:VBox> Now when i am scrolling then all images that leave the screen disappear :( When i take a look at the arrayCollection every item's BitmapData is null. Why is this the case?

    Read the article

  • certain BitMapData types dont work in a beginBitmapFill() method.

    - by numerical25
    Say I loaded a bitMap into a bitmapData type called tileImage. tileImage = Bitmap(loader.content).bitmapData; say I decided to add that bitmap into a sprite like below this.graphics.beginBitmapFill(tileImage ); this.graphics.drawRect(0, 0,tWidth ,tHeight ); It would of course work. But say If I decided to add tileImage into a another bitMapData type like below var tImage:BitmapData = new BitmapData(30,30); tImage.copyPixels(tileImage,tRect,tPoint); and I then added tImage to my sprite this.graphics.beginBitmapFill(tImage); this.graphics.drawRect(0, 0,tWidth ,tHeight ); I then get the following error ArgumentError: Error #2015: Invalid BitmapData. tRect and tPoint are all predefined and set. tRect x and y are 0,0 and the width and height are 30x30. tPoint is 0,0 as well. Yes I understand that this is a very brief explanation but I wanted to elaborate that a bitMapdata type that has its data from the copypixel method does not work with beginBitmapFill. but a varible that gets its data straigt from the source, does. One works, and one doesnt, yet they are both the same data types. why is this ?

    Read the article

  • Creating a GraphicsPath from a semi-transparent bitmap

    - by Moozhe
    I want to create a GraphicsPath and a list of Points to form the outline of the non-transparent area of a bitmap. If needed, I can guarantee that each image has only one solid collection of nontransparent pixels. So for example, I should be able to record the points either clockwise or counter-clockwise along the edge of the pixels and perform a full closed loop. The speed of this algorithm is not important. However, the efficiency of the resulting points is semi-important if I can skip some points to reduce in a smaller and less complex GraphicsPath. I will list my current code below which works perfectly with most images. However, some images which are more complex end up with paths which seem to connect in the wrong order. I think I know why this occurs, but I can't come up with a solution. public static Point[] GetOutlinePoints(Bitmap image) { List<Point> outlinePoints = new List<Point>(); BitmapData bitmapData = image.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb); byte[] originalBytes = new byte[image.Width * image.Height * 4]; Marshal.Copy(bitmapData.Scan0, originalBytes, 0, originalBytes.Length); for (int x = 0; x < bitmapData.Width; x++) { for (int y = 0; y < bitmapData.Height; y++) { byte alpha = originalBytes[y * bitmapData.Stride + 4 * x + 3]; if (alpha != 0) { Point p = new Point(x, y); if (!ContainsPoint(outlinePoints, p)) outlinePoints.Add(p); break; } } } for (int y = 0; y < bitmapData.Height; y++) { for (int x = bitmapData.Width - 1; x >= 0; x--) { byte alpha = originalBytes[y * bitmapData.Stride + 4 * x + 3]; if (alpha != 0) { Point p = new Point(x, y); if (!ContainsPoint(outlinePoints, p)) outlinePoints.Add(p); break; } } } for (int x = bitmapData.Width - 1; x >= 0; x--) { for (int y = bitmapData.Height - 1; y >= 0; y--) { byte alpha = originalBytes[y * bitmapData.Stride + 4 * x + 3]; if (alpha != 0) { Point p = new Point(x, y); if (!ContainsPoint(outlinePoints, p)) outlinePoints.Add(p); break; } } } for (int y = bitmapData.Height - 1; y >= 0; y--) { for (int x = 0; x < bitmapData.Width; x++) { byte alpha = originalBytes[y * bitmapData.Stride + 4 * x + 3]; if (alpha != 0) { Point p = new Point(x, y); if (!ContainsPoint(outlinePoints, p)) outlinePoints.Add(p); break; } } } // Added to close the loop outlinePoints.Add(outlinePoints[0]); image.UnlockBits(bitmapData); return outlinePoints.ToArray(); } public static bool ContainsPoint(IEnumerable<Point> points, Point value) { foreach (Point p in points) { if (p == value) return true; } return false; } And when I turn the points into a path: GraphicsPath outlinePath = new GraphicsPath(); outlinePath.AddLines(_outlinePoints); Here's an example showing what I want. The red outline should be an array of points which can be made into a GraphicsPath in order to perform hit detection, draw an outline pen, and fill it with a brush.

    Read the article

  • reverse colortransform alpha AS3

    - by Chris Porter
    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, 0, 0, 0, 1)); The problem appears to occur only to fully faded-out images. If I only go part way it is recoverable. fading out: faded back

    Read the article

  • Copying a 14bit grayscale image (saved in long[]) to a pictureBox

    - by Itsik
    My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the BitmapData.LockBits() mechanism to gain pointer access to the image data, and using memcpy(bmpData.Scan0.ToPointer(), imageData, sizeof(long)*height*width) to copy the image data to the Bitmap. For now, the only PixelFormat that is working is 32bit RGB, and the image appears in shades of blue with contours. Trying to initialize the Bitmap as 16bppGrayscale isn't working. I would ideally want to cast the array from long to word and using a 16bit format (hoping the the 14bit data will be displayed properly) but I'm not sure if this works. Also, I don't want to iterate over the image data, so finding the min/max and then histogram stretching to [0..255] isnt an option for me (the display must be as efficient as possible) Thanks

    Read the article

  • Changing a sprites bitmap

    - by numerical25
    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 and tHeight is how big the rectangle is. which is 30x30 This is what I do to change the bitmap when I role over the tile this.graphics.clear(); this.graphics.beginBitmapFill(tileImage); this.graphics.drawRect(60, 0,tWidth ,tHeight ); I clear the sprite canvas. I then rewrite to another position on tileImage. My problem is.... It removes the old tile completely but the new tile positions farther to the right then where the old bitmap appeared. My tile sheet is only 90px wide by 30px height. On top of that, it appears my new tile is drawn behind the old tile. Is there any better way to perfect this. again, all i want is for the bitmap to change colors

    Read the article

  • Unable to load images into each MC?

    - by Hwang
    The images only loads into the last MC, how to make it load into each MC? private function imageHandler():void { imageBox=new MovieClip(); imageBox.graphics.lineStyle(5, 0xFFFFFF); imageBox.graphics.beginFill(0xFF0000); imageBox.graphics.drawRect(0,0,150,225); imageBox.graphics.endFill(); allImage.addChild(imageBox); } private function getPhoto():void { for (i=0; i<myXMLList.length(); i++) { placePhoto(); imageHandler(); imagesArray.push(imageBox); imagesArray[i].x=20+(200*i); } addChild(allImage); allImage.x=-(allImage.width+20); allImage.y=-(allImage.height+50); } private function placePhoto():void { loadedPic=myXMLList[i].@PIC; galleryLoader = new Loader(); galleryLoader.load(new URLRequest(loadedPic)); galleryLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,picLoaded); } private function picLoaded(event:Event):void { bmp=new Bitmap(event.target.content.bitmapData); bmp.smoothing=true; imageBox.addChild(bmp); }

    Read the article

  • Getting each loaded image

    - by Hwang
    The images only loads into the last MC, how to make it load into each MC? private function imageHandler():void { imageBox=new MovieClip(); imageBox.graphics.lineStyle(5, 0xFFFFFF); imageBox.graphics.beginFill(0xFF0000); imageBox.graphics.drawRect(0,0,150,225); imageBox.graphics.endFill(); allImage.addChild(imageBox); } private function getPhoto():void { for (i=0; i<myXMLList.length(); i++) { placePhoto(); imageHandler(); imagesArray.push(imageBox); imagesArray[i].x=20+(200*i); } addChild(allImage); allImage.x=-(allImage.width+20); allImage.y=-(allImage.height+50); } private function placePhoto():void { loadedPic=myXMLList[i].@PIC; galleryLoader = new Loader(); galleryLoader.load(new URLRequest(loadedPic)); galleryLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,picLoaded); } private function picLoaded(event:Event):void { var bmpD=event.target.content.bitmapData for (j; j<myXMLList.length(); j++) { bmp=new Bitmap(bmpD); bmp.smoothing=true; bmp.name="bmp"+j; imagesArray[j].addChild(bmp); } }

    Read the article

  • How do I check on non-transparent pixels in a bitmapdata?

    - by Opoe
    I'm still working on my window cleaning game from one of my previous questions I marked a contribution as my answer, but after all this time I can't get it to work and I have to many questions about this so I decided to ask some more about it. As a sequel on my mentioned previous question, my question to you is: How can I check whether or not a bitmapData contains non transparent pixels? Subquestion: Is this possible when the masked image is a movieclip? Shouldn't I use graphics instead? Information I have: A dirtywindow movieclip on the bottom layer and a clean window movieclip on layer 2(mc1) on the layer above. To hide the top layer(the dirty window) I assign a mask to it. Code // this creates a mask that hides the movieclip on top var mask_mc:MovieClip = new MovieClip(); addChild(mask_mc) //assign the mask to the movieclip it should 'cover' mc1.mask = mask_mc; With a brush(cursor) the player wipes of the dirt ( actualy setting the fill from the mask to transparent so the clean window appears) //add event listeners for the 'brush' brush_mc.addEventListener(MouseEvent.MOUSE_DOWN,brushDown); brush_mc.addEventListener(MouseEvent.MOUSE_UP,brushUp); //function to drag the brush over the mask function brushDown(dragging:MouseEvent):void{ dragging.currentTarget.startDrag(); MovieClip(dragging.currentTarget).addEventListener(Event.ENTER_FRAME,erase) ; mask_mc.graphics.moveTo(brush_mc.x,brush_mc.y); } //function to stop dragging the brush over the mask function brushUp(dragging:MouseEvent):void{ dragging.currentTarget.stopDrag(); MovieClip(dragging.currentTarget).removeEventListener(Event.ENTER_FRAME,erase); } //fill the mask with transparant pixels so the movieclip turns visible function erase(e:Event):void{ with(mask_mc.graphics){ beginFill(0x000000); drawRect(brush_mc.x,brush_mc.y,brush_mc.width,brush_mc.height); endFill(); } }

    Read the article

1 2 3 4 5  | Next Page >