Drawing - Erase Line In Flex Canvas Drwing?
Dec 8, 2011
I am making a flex whiteboard application where lines are drawn over an image here is the scenario:
1: main canvas holding the background image and drawing canvas
2: user can move image by dragging image
3: user can draw over image, which is actually drawing on canvas over image.
I'm having problem on erasing lines like it eraser in paint. Searched evry where but didnot find a way to erase drawn lines
[Code]...
View 1 Replies
Similar Posts:
Jan 9, 2009
Im building a pretty simple drawing board in flash, i got this code from this forum and it works fine (there is more to it but this is the drawing part)[code]This works fine. But i want to be able to erase the drawings, step by step this is ths tricky part, ive looked everywhere(ok not everywhere) but in a whole lot of places but the only thing i found is how i could delete everything with removeChild and that in not what i want. Maybe i need to change the function abowe? Please help me to get in the right direction. What should i read about /look at?
View 5 Replies
Dec 23, 2009
I'm trying to write some code to an animated images of squares on a Flex Canvas There's something wrong with my code below because it becomes progressively slowerI assume I'm supposed to clear the old squares or something.What am I doing wrong below?:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();">
<mx:Script>
[code].....
View 1 Replies
Jun 1, 2010
I have a Sprite that I draw into using lineTo. Later the sprite is drawn into a bitmap to add to a mask. That works great. The issue is erasing the vectors in the Sprite once they are drawn.
To draw I just do something like:
userDrawing.graphics.lineStyle(12,0x000000,1);
userDrawing.graphics.lineTo(mouseX,mouseY)
[code].....
View 3 Replies
Jul 13, 2011
I am currently working with a Canvas object on which I am drawing curves using the curveTo() function of the canvas' corresponding Graphics object.The following animation is being performed on the Canvas object's scaleX attribute.<mx:AnimateProperty property="scaleX" fromValue="1" toValue=".5" duration="1000" />At present, this transformation is also scaling the line weight down by some arbitrary value. Is there any way to perform a scaleX transformation on the Canvas without it modifying the line weight of the lines drawn in the canvas?
View 1 Replies
May 16, 2010
I found this code on a forum which allows for an undo and erase button for a drawing application (and is perfect for what I need) but it's in AS2 and I can barely make sense of it:
Code:
_root.attachMovie("canvas", "canvas", 0);
d = 0;
[code].....
View 5 Replies
Aug 13, 2009
how to make eraser tool my problem is i have two sprite one have backgroun image and other one have drawing by pen ,brush.
now i want to make earser to erase only the drawing part not the background image .
View 6 Replies
Apr 5, 2011
I have this file http:[url].... Basically lines gets drawn where ever I tween the animation.arrow MovieClip. What I'm wanting to do is be able to rewind the MovieClip and have the line erase its self step by step.
View 1 Replies
Sep 9, 2011
Is there any way to erase a part of flash.display.Graphics canvas? Like
[cODE]....
This produces just a red square (the last 3 calls are noop), and what i need is a transparent square hole in it.
View 1 Replies
Feb 16, 2011
i want to draw a line with actionscript .Here is my code
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]......
View 2 Replies
Jul 9, 2009
I have a dynamic textfiled on stage and I am appending some lines of text each time in a new line with "
", so it like expand downwards.(it just currently serves me as a trace output online so I can check something)
what I would like to do is when that textfield reaches certain height that the first line at the top of the textfield gets deleted as a new one appers on the bottom and so on...
View 1 Replies
Dec 27, 2009
how do you erase last line of text from a multiline dynamic textfield, or last couple of lines?
View 3 Replies
Apr 13, 2010
Update: Once and for all, how can I draw a line that goes from (0,0) to the opposite corner of the stage?Here is what I have:
package
{
import flash.display.Sprite;
[code].....
View 1 Replies
Mar 15, 2010
[code]This code is drawing a colum chart with two columns and drawing a line across the top of both columns. I have two requirements: the line need to be dashed as of now the line starts from top right corner of the first column to the same corner of the second column. How can i shift the line to the left, so that it starts from center of first column to center of second column.
View 3 Replies
Sep 3, 2008
I'm using the drawing API features to do the following: I created two different squares and want to use them as two different canvas to draw on, they should be on top of each other so for testing purpose I overlap them partially here, but somehow I'm having trouble when trying to draw on the overlapped areas. Has any one encountered this problem or know how to solve it?
View 1 Replies
Nov 23, 2011
I am using Flex 4 and AS3 and I am trying to make it so that the user can draw a freehand line with the cursor - I have this part done.However, I also need the line to be a dashed line instead of one solid line like it is now. below is my code I am using. I have found some examples on how to do this, but they are all for straight lines, not for a freehand line.
Class File (DrawingArea):
package
{
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.MouseEvent;
[code]....
View 3 Replies
Jan 9, 2012
I am developing a white board application which allows the user to draw line with arrow head (some like Microsoft Word line with arrow feature). I am using graphics property along with lineTo() method to draw a line. Now i have to draw a angular arrow on the last point of line. I am drawing the arrow by connecting the points around last points. As 360 line can pass through this point and each line can have a different angle of arrow.
View 1 Replies
Jun 5, 2009
I have the following code in my flex project.
[Code]...
I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.
View 1 Replies
Apr 9, 2011
I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...
View 2 Replies
Sep 15, 2009
I want to make it so that a layer will be above the map when its drawn. Like I want a layer over this, cause im making a menu for the game, but the game is above the layer.
[Code]...
View 1 Replies
Jul 18, 2011
im trying to create a online business card editor to learn flash again, one of the functionality im trying to achieve is being able to upload an image (jpg,png etc) and place said image onto a drawing canvas and then being able to scale the image and rotate the image and move the image around. can some one direct me to a decent tutorial for this kind of functionality.
View 1 Replies
May 10, 2005
I need to to incorporate a functionality where the user can use his mouse to draw a rectangle by dragging his mouse over the canvas - much like the Rectangle Drawing Tool in the Flash Authoring environment. The requirement is something like a rubberband tool where the user can define a portion of a map by drawing a rectangle over it. The coordinates needs to be captured.
View 1 Replies
May 10, 2005
I need to to incorporate a functionality where the user can use his mouse to draw a rectangle by dragging his mouse over the canvas - much like the Rectangle Drawing Tool in the Flash Authoring environment. The requirement is something like a rubberband tool where the user can define a portion of a map by drawing a rectangle over it. The coordinates needs to be captured. Can anyone help me with the actionscript.
View 1 Replies
Nov 19, 2009
How do i animate a drawing line? I mean like from point A to point B, the flash will show it is "drawn" itself.Can I do it simply without actionscript? Is it possible? Because I have many lines to draw, to make it into a diamond.
View 14 Replies
Apr 16, 2009
What I'd like is the ability to draw a line with the drawing tools in Flash, and have that line appear onscreen as if it were being drawn. I don't think there's a way to do that with the animation tools (I'd like to give it a go, but I have no idea, once I've drawn a line and converted it into a symbol, how I could access the anchor points and whatnot of said line to then do some funky stuff with curveTo, or whatever better solution is out there...
View 2 Replies
May 15, 2009
How can a create an animation of line drawing itself.
View 1 Replies
Nov 9, 2009
With several flashes I'm trying to create, I find that I need to know how to depict a line being drawn or a plant/vine growing (same concept right). Obviously frame-by-frame animation can be used, but that's quite tedious. There must be some other, more productive way to pull it off. Example of the vine: [URL] I've tried shape tweens with shape hints but it didn't render very well at all.
View 6 Replies
Oct 18, 2010
I am looking for a smooth line drawing effect as in the pencil tool in Flash. I need to implement the same using as3.
View 7 Replies
Mar 26, 2009
I'm having troubles with the width of a line using the lineTo and lineStyle function, I can put setting the thickness and noScale parameters, and it works fine for no longer lines than 32000 pixels, but when I try longer line, the thickness changes to a bigger width. if you want to try what I'm saying you can prove this by changing the num variable:to 33000 for example:
num = 32000
this.createEmptyMovieClip ("Envolvente", 100);
this.Envolvente.lineStyle(0,0x00CC00,100, false, "none",
"round", "miter", 0.8);
[Code]...
View 2 Replies
Sep 4, 2011
i'm developing a game for mobile devices where I need to draw many objects and some lines(1~3 just occasionally).
my problem in short is: Line drawing is too slow for iPhone4
objects are drawn with bitmap, so it's pretty fast with GPU support. drawing lines are slow.
a end point of a line follows mouse cursor, so it changes every frame.
here's how i did it
initialization step:
var img:Shape = new Shape();
addChild( img );
[Code]....
that gives me 47~48 FPS on my iPhone. +2 FPS but still way too slow for a simple line.
without the line, i can maintain my whole game around 30 FPS. with the line, it goes below 20.
View 3 Replies