ActionScript 1/2 :: Make A Custom Eraser Tool Using Flash?
Sep 26, 2010
I did make a eraser tool. But once I begin to erase a layer, the background layer is visible. I want the layer just below the topmost layer to be visible.
For eg consider 2 layers. Layer2 is above Layer1. When I perform erase on Layer2, I see the stage background. I want to actually see Layer1 when I erase from Layer2.
Here is the code I used: The comment entry shows that, I have tried that possiblity.
import flash.display.BitmapData;
var linkageId:String = "myimage";
var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
[Code]...
View 3 Replies
Similar Posts:
Nov 11, 2010
I simulate a pencil tool in my application, now i want simulate a eraser tool, but no success. how can i eraser that lines draw by pencil in as 3? i try removeChildAt(0); it work's but all draw is erased. [code]...
View 1 Replies
May 3, 2011
I am developing an application similar to MS Paint. I am building a Flash Paint application. The basic structure is this. I have two layers namely topLayer_mc and bottomLayer_mc. The actual vector drawing is drawn on the top layer and onmouseUp of the tool, a bitmap copy of the vector graphics on the top layer is taken and added as a bitmap to the bottom layer. The top layer is cleared subsequently. It is working for the pencil tool.
Now I need to create an eraser tool. This is where things get tricky. In the application there is an option to save the image as png, so alpha has top be preserved. So the coventional method of draw a brush using the vector and using the draw method of bitmap will not work. Of course, on a visual level it would work if the brush drawn using the vector is to have the same color as that of the background. The eraser's are rectangular in shape.
The technique I am tring to use is to use the copyChannel method of BitmapData class. Specify a channels (say GREEN channel )hex value as 00 and make it as the source. Then make the destination channel ALPHA. I got it working without using movieclips as shown below.
[Code]....
View 1 Replies
Mar 13, 2010
Mac OS 10.4.11; Flash CS3.I cannot change the tool any more. It's stuck on the eraser. It doesn't erase anything, but I can't change it to another tool.I uninstalled Flash, preferences and all, and re-installed it, but the problem persists. Interesting is, my customized workspace is still there, even though I had all preferences and anything else that has the name "Flash" deleted.At the same time the computer opens both CD trays when booting up. Never did that before. So I re-installed the OS, but that didn't help either.
View 1 Replies
Jul 4, 2011
I have a requirement to create a drawing tool. I have completed till where on mouse down i can draw and on mouse up i stop the drawing. Now i want a eraser in place; something very similar to what is there in paint. So on mouse down of the eraser and moving over the line segment should erase the portion of the lines.
View 5 Replies
Dec 29, 2010
How can I implement an eraser in Flex so that when it erases on an mx:Image, it makes the area transparent?
View 4 Replies
Aug 26, 2009
Ive got this problem: the users of my webapplication can upload pictures and draw on them, but would it be possible to let the user erase parts of their uploaded picture (jpg or png) using the eraser tool?. like upload the picture and then convert it to a file that the user can manipulate?
View 2 Replies
Feb 15, 2010
In the previous version, the eraser tool only erase things on the single current active layer, but then in CS4 (maybe it's just my problem), the eraser tool simply erase everything on the stage, no matter which layer they are in, except in locked layer.
Is it a bug for cs4 or hv I set something wrong or what?
View 4 Replies
Jan 16, 2012
I've made most of my application now, which allows the user to draw on a canvas, I'm just not sure on how I would go about creating a button which allows the user to switch to an eraser, or what code I would even use?
View 3 Replies
Aug 20, 2005
get the zip file which will be very helpfull. I made some screenshots in photoshop for help.
1). map jpg: That's the map
2). the map is covered with a black layer
3).the user changes (somehow) the _alpha property (before starting revealing the image) to -let's say- 60% and reveals with the eraser the path of the map up to some point.
4).the user sets the _alpha of the cover back to 100% in order to get the picture shown in the example.
View 2 Replies
Aug 22, 2005
how can I make one of these tweens go off at a certian frame ? so I can run one after the other and such?? instead of slowing it down with the time it takes to run the tween,
View 3 Replies
Sep 5, 2003
does any1 know how to do a flash interactive eraser?it's something like the other flash paint programs,but unlike those programs i have found so far,they only have a button for erasing the whole screen...i need a flash program that uses an interactive eraser tool...
View 9 Replies
Feb 28, 2011
In photoshop, you can create a path with the pen tool and then make that path a selection as if you'd used the lasso tool. How do you turn a pen path into a lasso selection in Flash (CS4)?
View 2 Replies
Oct 27, 2009
I need help to make a tool for measuring function in a map. A textfield should follow the cursor and tell the distance to a point in the map.
View 10 Replies
Jul 21, 2009
Make a powerpoint presentation tool in FMIS3 with AS3.0
View 1 Replies
Aug 16, 2010
Open a video file embedded in the application.open some pdf files, preferably embedded in the application, but if it will have to open externally, it's no problem.Work in fullscreen on the user computer, with a minimum resolution of 1024x768. I'm thinking about a resolution of 1024x768, centered on a black background.
I was thinking of using Flash, but I don't have much experience, so if there is another easier IDE that creates a Flash application, I would prefer that.
View 3 Replies
Jul 15, 2009
well i tried to make a selection tool just for the heck of it, so when you click and drag a box apear and selects multiple things you drag over, i got it 80% done but im stuck in a rut, here is my fla please give me advice on improving, youll see what i mean when you run it[URL]...
View 0 Replies
Aug 12, 2010
I made my page in flash as2 every day i change some news tha i have in my page but is very dificult because i dont have an admin panel that is why i ask if you know anything about how to make an admin panel for my page
View 0 Replies
Jul 10, 2010
I followed a tutorial on youtube on how to make a custom flash player but the guy never uploaded continuing videos. Here's the link to the video: www(dot)youtube(dot)com/watch?v=_8q3NuboKQI So all I have now is a 3.0 Action Script file with a layer that has this code in it:
[Code]....
View 3 Replies
Apr 4, 2009
3d rotate tool is there any way to make it work at runtime. just like the bone tool.
View 2 Replies
Aug 27, 2009
1. How can I change the size of the brush tool? It's all greyed out on every project I start, stuck at the very smallest size (0.10). I'm trying to trace over a photo at the moment, and it's taking FOREVER with the tiny little brush. It only un-greys itself after I draw a line, but I can only change the size of the line I've just drawn. As soon as I go to draw a new line, it goes straight back to size 0.10.I'd use the pencil tool, because I can change that, but...
2. How do you make the eyedropper tool put your chosen colour into the pencil colour box as opposed to the brush box? Every time I use it, it forces me to use the brush. Which, because of the above problem, is ridiculously inconvenient to draw with in just about every situation.
View 1 Replies
Nov 20, 2009
Is there a way to make a bulleted list in flash with custom bullets? If so, can this be used from within a TextArea in Flex (mx.controls.TextArea) when setting htmlText?
For example:
<li>Item</li>
<li>Item</li>
The list above will render fine when set into a TextArea using htmlText (versus just setting the text property). The rendered text will have standard vanilla bullets. Is there a way to style these bullets with custom images, like you can in standard HTML/CSS?
View 4 Replies
Aug 13, 2006
i want to know how to make a good clean video player in flash pro 7.2.
1. show my a website telling me to do that.
2. give me a understandable tutorial
3. send me a file showing how its done.
View 4 Replies
Mar 12, 2010
I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing
Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
drawing_mc.lineStyle(1,100);
[code].....
View 1 Replies
Jun 7, 2010
i see there are various choices in the dropdown, but i still need it bigger. can this be done?
View 3 Replies
May 6, 2009
I found that .fla files do not save in Flash CS4 when the Deco tool or Spray Brush tool is selected. Is this a bug? Or is there a workaround to this issue.
View 3 Replies
Jun 2, 2009
I know how to make a webpage pop up out of flash that links to a certain site or whatever...
But can you put the HTML inside flash itself, so all the source is contained in the flash, and when you open the webpage, it will be generated as stored in flash?
View 2 Replies
Jun 21, 2011
So we have a component we have written ourselves that deals with text display and translation between languages, reading translations from a file. Ideally what we would like to do is have this component be compatible with any font we can embed in the main .swf's library. What's the best way to do that?
Currently we are going down the route of having our component have an attribute for the font name, lets say 'Font1'. We drag the component into the .FLA file we want and then add a new font to the library called 'Font1' and set it to the typeface we want. This is proving to be inconsistent and problematic which implies it's not really an ideal way of doing it.
Is there anyway to achieve the feature we want? The key is flexibility, we want to easily support languages (hence the component) but we don't want design to be limited in their font selection. Its not practical to embed a range of fonts in the component for example, as it adds to file size and is restrictive.
View 1 Replies
Jul 6, 2009
Working with senocular Transform Tool - How to remove/disable tool for objects Im new to AS3, and i have to use it for my current project. I have used the AS2 Transform tool extensively, but needless to say, the AS3 version works entirely differently.
The way i understand it, the tool applies to and every Sprite , movieclip on stage
[Code]...
View 2 Replies
Aug 3, 2009
Can any one tell me how to make transformation tool for horizontal scaling and vertical scaling the image
like that link[url]...
View 1 Replies