ActionScript 3.0 :: CS3 Linestyle / User Drawing With Variable
Feb 23, 2009
I'm attempting to make a very simple drawing programme. There will be maybe 4/5 buttons. Three of them when you click on the change the color of the line the user draws. the other two will change the line thickness. I've tried setting up a variable to set to how thick the line should be depending on the button the user has pressed.But it has no effect - i'm guessing that's because the variable only exists within the confines of the function that I have it in.[code]
View 1 Replies
Similar Posts:
Mar 11, 2007
I was told to learn OOP, and here is my first class. It is to draw a box where you can set width, height, x, y, target movie clip, depth and lineStyle. I test my fla but it returns error on getLineStyle function.
View 3 Replies
Mar 16, 2010
I have a drawing api with the simple code of a flash:
Code:
stop();
this.createEmptyMovieClip("dibujo", 1);
dibujo.lineStyle(4, 0x000FFF, 100);
attachMovie("lapiz", "lapiz", 11);
[Code] .....
But I need a more complex lineStyle, I mean, a brush that look like a paint brush, like water color.
View 0 Replies
Aug 31, 2011
I'm trying to draw a mask that's a pill shape but I can't seem to adjust the linestyle properly.
Code:
import flash.display.Sprite;
var pill:Sprite = new Sprite();
pill.graphics.beginFill(0xFF0000,1);
pill.graphics.lineStyle(1,0x000000,1,false,"normal","round","round");
pill.graphics.moveTo(0,6);
[Code] .....
View 3 Replies
Aug 7, 2009
I am looking for a tutorial on how to achieve this effect:[URL]..(only the drawing part, not the moving stage)
View 2 Replies
Jul 25, 2011
I've got a program that needs to let the user draw ellipse a on the stage and I need to track the positions so I can re-draw them when they come back. I've got that mostly working, except, I need to let them draw up to 5 ellipses and be able to delete ones that they have already drawn so they can draw new ones.I'm having difficulty managing the children, object numbering/naming, etc.Here's the code that's working as far as drawing the ellipse:
Actionscript Code:
import flash.display.Sprite;import flash.events.*;import flash.ui.Mouse;import[code].....
View 6 Replies
Jun 24, 2009
How to make multi user drawing application in as 3.0
View 8 Replies
Aug 25, 2009
I am making a multiple drawing application in that three user can do drawing at same canves at same time. I have three layer one for each user. Now at the end I want to calculate the contribution of each user. How to calculate contribution
View 6 Replies
Aug 19, 2010
I've been unable to find info on this because it's tricky to find the correct keywords. I want to allow the user to draw a line so that the application can measure the distance between two points chosen by the user. I could let the user click on one point and then the other but it would be much better if, after clicking the first point, a line would follow the mouse cursor like in most graphic applications. How would you do that? Is there a convenient method for that? Maybe use the MOUSE_MOVE event after the MOUSE_CLICK and continuously draw a line?
View 3 Replies
Jul 14, 2004
I need to know how to script the drawing board as in the user can only draw on a specified area. For example, on a 800x600 layout, only 1/4 of it is the drawing board.After the user has drawn the image, when he/she clicks on a button, the image will be replicated on another area in the same 800x600 space. So far, I can only manage to make a drawing board on the whole 800x600 space and erasing.
View 2 Replies
Sep 21, 2011
I want to display text which can be circled/marked over by the user. Also the user must be able to print/erase and move on to a new swf file once the page has been printed off. I have looked at a few different options but as yet I have been unsuccessful with the functionality.
View 1 Replies
Dec 18, 2009
I am working on a project right now that requires user input of dimensions to draw a bike. I am using actionscript to draw the bike on top of some bitmap images. the problem I am running into, is that the actionscript will not draw on top of the images. The images are on a layer below the layer with the actionscript.
View 2 Replies
Jun 27, 2007
The specifications where as follows: there should be a black square in which there is a faint picture of a sign. The user must be able to draw in the square and when he repeats the contours of the sign correctly - a popup appears.I made myself familiar with the ways you can allow a user to draw. However I have no idea how would you know if the two shapes/signs match and whether the user at least approximately drew the correct contour/sign
View 2 Replies
Jan 19, 2006
I have been trying to do some dynamic drawing with flash but can't seem to address a movie clip if I stick a variable in it's name.[code]...
View 2 Replies
Jan 11, 2008
How do you draw a variable in simple font? How do you control where it drawn?
View 4 Replies
Oct 27, 2009
All i am looking for is to draw a line from point 1 x, y z, to point2 x y z Since this was CS 4 and z properties are enabled, i wonder how i could do this for a line.
View 3 Replies
Dec 20, 2009
With linestyle, I can only specify a color unit value. How do I add a gradient to the line?
View 1 Replies
Apr 11, 2011
i am trying to make a brush tool in actionscript 3, where kids can paint colors inside a circle using the brush. i have achieved this using linestyle. Now i want the brush to snap the color when the kid is about to complete(say when they are 95% to complete the painting). How do i know how much the kid has painted on the circle?
View 2 Replies
Oct 12, 2007
Does anyone know if its possible to draw a dotted line through script?
View 5 Replies
Jan 20, 2010
Normally when we draw a rectangle with linewidth 1 no problem.But if we apply a linewidth more than 10, the corners of rectangle seems rounded shape.[code]
View 2 Replies
Jul 28, 2006
I have a box lined out by AS.
How can I change its lineStyle when rollOver, making it draker for example?
View 3 Replies
Feb 3, 2009
Is there a way to draw a line with graphics.lineTo() that is thinner than 1point? According to the documentation the thinnest lineStyle possible should be 0 but I cannot see any difference between a 0 stroke and a 1 stroke?
View 4 Replies
Feb 24, 2010
The sprite which contains all element in my game world uses the real-world meter as distance unit, it doesn't know what pixels are. I then apply a scale to this sprite to make it appear correct on screen. Currently I use 1 meter = 100 pixels, so scale = 100.
If I try to draw a line inside this sprite it appears lineStyle(thinkness) rounds the thickness parameter. If I specify 0.5 (50 cm) it always gets drawn with 1 pixel (1 cm). If I specify 0.6, the line becomes 100 pixels, or 1 meter, thick. So basically I can only draw lines of 1, 100, 200 etc pixels thinkness.
Anything I can do about this? Otherwise I'll have to use a smaller unit like millimeters for my world.
View 1 Replies
Mar 31, 2010
im drawing a line from 0,0 to 100,100 im using this to modify the linestyle:
draw_line.graphics.lineStyle(1, 0xFF0000);
That line is now of 1 thickness.Is there anyway i can change the thickness of the line to say 10, but without redrawing the line?
View 2 Replies
Dec 18, 2009
How do I add gradient fill on a line (linestyle) rather than a box?
View 1 Replies
Mar 21, 2007
I am creating the line trough "lineStyle" method but I need that instead of color on the fill I want to use an image.something like the beginBitmapFill well I tried everything and could not fin a solution for that.even the " lineGradientStyle" does not supprt the bitmap fill...
View 2 Replies
May 19, 2010
i'm trying to build a circle using lines. each line starts in the centre of the circle and is as long as the circle's radius. using a loop along with sine and cosign waves, i can build the circle using the sine and cosign to mark the coordinates of the lineTo parameter.
my problem is with the line thickness parameter of lineStyle. i would like the ends of the lines to match up perfectly, no matter how big the circumference of the circle, but i can't figure out a proper method for the line thickness.
//this is what makes sense to me, but it still creates some gaps
lineThickness = 1 + (((nRadius * 2) * Math.PI) - 360) / 359;
for(var i:int = 0; i < 360; i++)
[code]....
to make the ends of the lines meet up at the circles circumference, without any gaps, i need to widen the lines to fill in the space that's remaining. what makes sense to me, but doesn't work, is to subtract the 360 from the circumference, then divide that number by the amount of empty slots between the lines (which is 359) and adding that number the the thickness of 1.
what's concerning me is that the lineStyle thickness parameter is a Number, but seems to take only values between 0 and 255, so i'm not sure if a floating point number like 1.354 is a valid thickness.
View 1 Replies
Jun 29, 2010
i'm attempting to draw lines beside each other, but the last line from the first color group takes on the color from the second color group before the second color is assigned.
[Code]...
View 2 Replies
Dec 5, 2011
I draw a line using "graphics.lineTo" into a movieclip and I need to change my linestyle if the user ask for that throw a button in runtime. I can change the color, but I can't change the linestyle...Is there someway to change it?
View 1 Replies
Jul 14, 2009
i would like to see if it is possible to have a user permanently change a variable that is utilized in the website. for instance, the width of a line is set to 1.0 in the script - through a keystroke the user can change that width to 2.0. what i would like to happen is have the value of 2.0 be permanently set so that when the next person visits the site, the width is set to 2.0. i know this is a simple example, but i would like to get the concept down first before i venture into writing out the script and doing something more interesting with it.
View 4 Replies