Drawing Lines
Hi, i am trying to create a lien drawing swf for people to draw pictures. i was wodering is anybody aware if there is a way of scripting or controling where the user can draw?? it would be grand if there is !! thanks in advance!
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-23-2004, 06:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Some Problems Drawing Lines Over Other Lines...
Hi.
I'm designing a character for a movie I'm gonna make, but I'm having some trouble. I recently decided to change the colors of the lines I used, so I switched them around a bit to match the fills but some of the lines I changed the color of now overlap the lines that are supposed to be in front. I tried to draw the 'good' color over them again but at the moment I release the button the lines I draw disappear again and the others overlap them. Any help? I'm using mx 2004.
Thanks in advance
Drawing Lines
Hi,
i am building an application in which i have to draw a line between two points.The starting point is fixed,whereas the end point of the line is not fixed.the line is always horizontal.
what i have done is that i have made a movie clip of a line.
i increase the width of the line till it reaches the end point.but when i increase the width,the height of the movie clip also increases and the line appears thicker.
can anyone help me as to how i can overcome this problem.
regards
Jayant Chaudhuri
Drawing Lines
Is there some trick to drawing lines and not have them look blurry? Especially when you draw lines that are at angles,i.e 45 degrees, they come out looking blurry? Any thoughts on how to stop that.
Thanks, LOTW
Drawing Lines
ive been looking everywhere.. ive created a dynamic nav menu where the _x and _y of each button comes from an array. ive seen this on websites so i know it can be done, but i havent been able to find informaion on it anywhere... i want to create lines in between each button that connects to the previous 1 so that they are all linked together..
does anyone know how or knows of somewhere where i can get the info on how ot create this effect? thanx for your time
i hear there is a new way than flash 5 to do it with script ,id be interested in either
jon
Drawing Lines
Question for the flash experts;
I need to be able to click on any spot on a large rectangle.
While holding down the mouse, and dragging the cursor to a different spot on the rectangle, be able to draw a line, and when you let go of the mouse it leaves the line on the rectangle,and displaying the length of the line in centimeters. Is this possible and if so,how in actionscript?
Drawing Lines
I am using Flash 5. I don't have MX. I want to do basically the
equivalent of moveTo and lineTo. I tried making a little movie
clip with a line in it and then scaling it to the width I want,
but the reason this doesn't work is because the line becomes
extremely fat! I want the height of the line to always be 1
and be able to modify the width. I couldn't find a way to do
this. My other idea was to just call duplicateMovieClip on my
movieclip with the little line in it how ever many times I would
need to and then appending all the movie clips back to back and
embedding them inside another clip called line1 or lineN whatever. Then I could try to use the _rotate property to change the angle.
This is a mess though. Is there an easier way??
Thanks,
Skasnad...
Drawing Lines
How do I create an animation as if a line is being drawn??
Drawing Lines
Dear all
I would kindly ask if someone knows how to draw lines or other shapes in Flash 5 by means of ActionScript.
Thanks a lot
Soulaimane
Drawing Lines - Help
hi all,
can anyone help me with thi problem?
I have a movie clip (inst name object) containing another MC (inst name dot).
i want to draw a line from the center point of object to the center point of dot, no problem:
Code:
this.createEmptyMovieClip("line"+clipID, depth);
with (this["line"+clipID]) {
lineStyle(1, 0x000000, 100);
moveTo(0, 0);
lineTo(this.dot._x, this.dot._y);
}
dot is dragable. when you drag it i want the line to resize/redraw to follow dot.
i did have:
Code:
this.onEnterFrame = function() {
this["line"+clipID].lineTo(this.dot._x, this.dot._y)
which worked but drew new lines each time so i ended up with a screen full of lines
I only want one line which streaches to where every dot is.
any suggestions would be great
Ian
Drawing Lines?
hey all. I was wondering if there are any way to "draw lines" in a movie clip... meaning, if I have a line and I want to to lengthen (but not get fatter) how would I go about doing this? thanks!
Drawing Lines
I would love to know how to draw the lines to create boxes in my flash movie like on this site >> http://www.gammamedia.co.uk/index2.html. Is it done using masking? Whats the best fluid way to create this?
Super G
Drawing Lines
I would love to know how to draw the lines to create boxes in my flash movie like on this site >> http://www.gammamedia.co.uk/index2.html. Is it done using masking? Whats the best fluid way to create this?
Super G
Drawing Lines
Ok, I am trying to make a type of drawing program(very simple example shown), but the only problem I am having trouble making an mc using the draw API to draw from like the 1st btn to the second btn since they are dynamcially created and are added when ever the user clicks, Does any one know how to make the line draw from like 1 to 2 to 3 to 4 ...to last button created, I also am wondering if I put script on the duplicated movieclip(which acts like a button) that says to trace its name when it is loaded, it always traces the name of the movieclip being duplicated, it is in the example Thanks for any help
Drawing Lines: Help
Hi everyone!
I'm doing a little game of the type of "conect the dots". I'm still at the beginning and I want a movieclip that creates a line from the movieclip to where the mouse pointer is. I already managed to do that, but happens that when the mouse moves, the lines that were draw before stays on the stage and the new lines too. So what happens when you move your mouse around is a terrible mess, lines all over the place. Is there a code to erase the last lines and only consider the current one, that equals the position x and y of the mouse?
Thanks in advance!
Help With Drawing Lines
Hey all,
I 've used flash a little bit but never figured out how to easily extend lines (and thus create an animating effect) easily in Flash.
I.e.:
frame 1 = ----
frame 2 = ------
frame 3 = ---------
I don't want to have to draw a new extender each frame since i would like to make a long line ....is there an easy way to do this in Freehand or Flash?
(my current method of copy frame, paste, and draw extension takes about 8 gazillion hours)...thanks for any help!
Drawing Lines
hello,
i think everybody know what is polygon lasso tool in photoshop, w would like to do the same effect in flash, my question is: anybody seen something like this made in flash ? maby something thats simmilar to the effect i try to make ?
Drawing Lines
Is there a way to tell flash to draw lines purely from script? like without creating movie clips and such?
for example if I have two points a and b and i want to draw a straight line between them, is there code for this?
Drawing Lines
whats an easy way to draw an ever going line that passes through point A and point B?
note: point A and point B will be moving
Q About Drawing Lines
Here's what I've got: I made a scope that shows up on screen as a 200x200 black box. In it are 200 1x1 dots, one in each column. Whenever you "push" a value into the scope, the y-coordinate of the dot farthest to the right takes on that value (or rather a value proportionate to that value), the y-coordinate of the next dot to the left takes on the second newest value, etc. The effect is that you get something that resembles a heart rate monitor. Here is the code within the scope:
Code:
var values:Array = new Array();
var dots:Array = new Array();
this.createEmptyMovieClip("scopeLine", this.getNextHighestDepth());
scopeLine.lineStyle(0, 0x009900, 100);
//initialize scope values to bottom of scope
for (var i:Number = 0; i <= 200; i++)
{values[i] = 200;
}
//draw dots on scope
//The dots themselves never go away, and the x-coord. of the dots remain unchanged.
//Only the y-coord. ever changes.
for (var i:Number = 0; i <= 200; i++)
{dots[i] = this.attachMovie("Dot", "dot" + i, this.getNextHighestDepth(),
{_x:i, _y:values[i]});
}
//push newest value into last index, all others down one
//val must be between 0 and 255, inclusive
function pushValue(val:Number):Void
{for (var i:Number = 0; i < 200; i++)
{values[i] = values[i+1];
dots[i]._y = values[i];
}
values[200] = 200 - val * 200 / 255.0;
dots[200]._y = values[200];
scopeLine.clear();
scopeLine.moveTo(0, values[0]);
//now connect the dots
for (var i:Number = 1; i <= 200; i++)
{scopeLine.lineTo(i, values[i]);
}
}
Because of a limit on how fast I can obtain new values, I can only push a new value on every 50 milliseconds. The scope still works okay, but I thought that if I could connect the dots with lines it would look even better. The problem is, I can't get the lines to show up. Any thoughts?
Drawing Lines
Hey, I'm fairly new to AS, and know this is pretty simple, and have the general idea of how to do it, but can't figure the correct code.
I have a MC that moves along a guide path. I want, as it moves along the path, to draw an outline.
I've read about lineTo(), and the basic concept of how to draw lines, but can't seem to figure out how to write a for loop, to track the location of the MC that moves along the path, and how to draw a line from that.
Any suggestions?
Thanks
Drawing Lines
Alright, first an overview of what my application will be doing:
User inputs two values, meters/s and degrees. Flash then calculates some trigonometric functions etc and gets 2 values. It then selects 10 spots depending on the speed, degrees, etc.
What I need help with is to make it first draw from 0,0 in my movieclip, to spot 1 then spot 2 then spot 3 and so on. And I only want a simple line.
Would be grateful if anyone could explain how to do this to me in a way that's very easy to understand, thanks.
Drawing API For Lines
I have the following code below. The code uses the flash drawing api to draw a black line using the mouse.
ActionScript Code:
createEmptyMovieClip("theline",1);
theline.lineStyle(10,0x000000,100);
imdrawing = false;
onMouseDown = function () {
if (imdrawing == false) {
theline.moveTo(_xmouse, _ymouse);
imdrawing = true;
}
if (imdrawing == true) {
onEnterFrame = function () {
theline.lineTo(_xmouse, _ymouse);
};
}
};
onMouseUp = function () {
onEnterFrame = function () {
imdrawing = false;
};
};
Does anyone know how to make a line disappear once I’ve drawn it? So, for example when I draw a line on the stage I want that line to disappear. Every line I draw should disappear once I’ve drawn it.
Anyone got any ideas?
Drawing Lines
I am trying to create a pattern by drawing curved lines using actionscript. However the following code eats so much processsing power that whne you add it to the rest of my site it slows down all the animations in my piece.
createEmptyMovieClip ("curveLine", 3);
curveLine.lineStyle (1,0xCCCCCC,100);
for(i=0;i<300;i+=25){
curveLine.moveTo(0,0);
curvetLine.curveTo (0,45+(i*4),900,600);}
Bearing in mind it is only drawing roughly 9 static curved lines, why is eating so much power? if you up the amount of lines to be drawn the more extreme the prblem becomes. Any ideas. thanks to any responders J.
Edited: 01/31/2007 at 01:49:38 AM by jonnybennett
Drawing Lines And What Not.
How can you make a paint-like Flash where you can "draw" with the lines?
Like, click, drag, it makes a line.
Any thoughts?
Drawing Lines...
[swf="http://funplus.elementfx.com/vectors.swf"]width=500 height=500[/swf]
FLA: http://funplus.elementfx.com/vectors.fla
As you can see, when I try to draw a line, it gets dragged until it draws a new one, and looks really bad. The FLA is attached, I don't want to bother explaining everything. Using a with statement on a movieclip in the _root for the line still makes it drag with the circle, I don't know why. How could I make it nicer, less choppy, and not drag with the circle?
EDIT: Okay, I updated it. It still has the problems, though, of the line being attached to the circle.
Drawing Lines
Hey I was wondering. Say I made 2 circles that were draggable, how would i make it so a line would stay connected to both circles at all times? Ok thanks!
Self Drawing Lines
Hi, sorry if this is a really basic question or has been answered before, but im trying to achieve an effect like lines drawing themselves in flash. kind of like the effect that stardust create in their microsoft campaigns ( http://www.stardust.tv/ ) but obviously a bit more simplistic. i get the impression its based on masking and motion guides with AS. but im not that hot with flash yet, so. any help or tutorials would be great.
any help much appreciated.
Dan
Drawing Lines
I've been working on flash for months now, and I know how to do a lot of things, but not this. How do I draw lines (like 2advanced , right after you click Enter)? It's probably really simple but I can't figure it out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Drawing Lines And What Not.
How can you make a paint-like Flash where you can "draw" with the lines?
Like, click, drag, it makes a line.
Any thoughts?
Drawing Lines
I was wondering If anyone knows how to connect a line to one mc to another with actionscript.
Drawing Lines Dynamically
Hey, people!
I want to draw a line by dynamically changing its starting and ending points. I can define the X and Y of the points dynamically, but what I don't know how to do is draw the actual line between these points. In Macromedia's site of the day from July 6 (http://www.therevolution.com.au/clients.html), you can see something similar to what I'm talking about. They have the lower right hand corner as one of the points and the mouse position as the other. How is the actual line drawn between these points, though?
Thanks!
Drawing Lines Etc From Actionscript?
Drawing lines from actions scipt. Ive seen it done with ONLY code. How can i do it? For example is there a function
drawLine(26,85 to 45,34); ?
Drawing Lines... AROUND Objects...
hey... say for example i have a curve on my page... and i want to highlight it, or shade it with a simple line... 1 px wide or tall....
is there an option in flash to recreate these borders?
i really want to avoid cutting and pasting the object, resizing it... changing its colour and placing the main object ontop of it...
i need to use the lines for stuff like dotted lines n stuff
surely u understand what i mean right?
Drawing Lines With Actionscripting.....?
I would like to draw lines around my site, while it preloads, and was thinking about, if there is a way to do that using AS insted of tweening ???
I guess it makes it a smaller file than tweening !??
Thanks
Per Haar
Drawing Lines In Flash
Hi guys,
Ronded edges are no problem for me in Flash, but now I want to make the gray line, as shown below. How to do this in Flash. Is it possible?
Please let me know.
Thank you,
NNV
Drawing Lines With Another Object
Hi!
I've managed to get a small grey ball to move around the screen in a certain way but I'd like it to draw a permanent line behind it as goes, any ideas how i'd do this?
Many thanks, Hannah
Drawing Lines Animation
I know its kinda simple, but i was wondering if anyone could walk me through making it look as if a line is being drawn, not necessarily by a pen or anything, just a line drawing a square or any other shape.....
Drawing Lines For A Triangle
Well yes. That's basically it. I have 3 circles that automatically form a triangle wherever they are dragged to, but I want 3 lines to be drawn to make a triangle. I've tried stuff like lineTo and moveTo, but it just stays there after every frame and I can't remove it with removeMovieClip();
so..... it would help if someone would just say how to draw a line every frame, from 1 circle to the other, assuming 1 circle was "_root.ball1" and the other "_root.ball2". And also so it would remove the last line drawn. I'm pretty sure it's not that hard, just I don't know what to do.
Cheers.
Drawing Lines With AS Vs Tweening
hello!
does flash render out straight lines faster using tweening or coded with AS? lets say i want to animate some simple boxes being drawn - faster by AS or tweening? (i'm exporting a flash5 swf if that matters)
thanks for the info!
Drawing Lines Via A Path
I have a path that looks lige the "&" sign. Then I have a pointer that follows that path. The path is not visible, but I want to reveal the path along with the progress of my pointer.
If anyone could point me to a tutorial or tell me how??
Drawing Lines In Movie
Is there a way to have lines draw themselves in a movie? Usually to create this effect I create a long line, and have it come onto the stage, or creeate a small one and have it grow with a motion tween. I am looking for an easier way to do this.
Drawing Lines And Circles
Is there an easy way i can add 2 buttons on my flash movie..one that allows the user to draw a line and one to allow the user to draw a circle? I've found several drawing program tutorials but they have too much in them and I only want to do lines and circles.
Drawing Straight Lines
Hi all,
First post here. I'm familiar with php/mysql and just now starting with Flash MX.
Question: To create lines that appear to self-draw themselves, is it better to use an animated mask layer or through ActionScripting?
Also, does anyone feel strongly that the upgrade to MX 2004 is justified ?
TIA
Fuzzy Lines When Drawing?
Suppose I'll post in this forum. Sometimes I'll draw a simple line and curve it to make a picture. Sometimes the lines look perfectly smooth and other times they come out looking all fuzzy. Is there something that can be done about this or is this just me screwing something up . Here is a pic of a recent drawing with the fuzzy lines. It's not the file saving format issue because this pic is a screenshot of what it looks like in flash.
Drawing Lines With Actionscript
Hi I am using flash mx
problem:
draw lines with actionscript. x and y co-ordinates are pulled from 2D array. Nodes are attatched via attachMovie method. I can't seem to get flash to draw lines from node to node starting at the first x,y co-rdinate of node1
Any ideas
here is my code
myDimensionalArray = "10,50 100,100 150,150 200,200 250,250";
newTwoDArray = myDimensionalArray.split(" ");
newTwoDArrayLength = newTwoDArray.length;
for (i = 0; i < newTwoDArrayLength; i++) {
tmpArray = new Array();
tmpArray = newTwoDArray[i].split(",");
tmpArrayLength = tmpArray.length;
newTwoDArray[i] = new Array();
for (j = 0; j < tmpArrayLength; j++) {
// assign value of temp array element to the 2D array second row
newTwoDArray[i][j] = tmpArray[j];
node_x = newTwoDArray[i][0];
// gives index's ist row
node_y = tmpArray[j];
//gives index's 2nd row
// set nodes to stage with proerties from new2D array
attachMovie("node", "node" + i, i);
setProperty("node" + i, _x, node_x);
setProperty("node" + i, _y, node_y);
// set node output text box showing x, y for each node
_root["node" + i].txtb.htmlText = "My X = " + _root["node" + i]._x + " <br />My Y = " + _root["node" + i]._y;
//draw line from node to node
lineStyle(2, 0x000000);
moveTo(_root["node" + i]._x, _root["node" + i]._y);
lineTo(["node" + i]._x, ["node" + i]._y);
}
}
Any help appreciated
Thanks
Drawing Lines Effect
Hey,
I've been wondering this for quite sometime, and found an answer years back on here, but recently have ran into a new project and have totally forgotten how it was done !
Anyway, what im wanting to know.. is how do you make a drawing line (ie. a stroke) which follows a set path. Kinda like say if you have the word "TEXT", it will draw the letters individually one by one.
Heres a more complex example of what im after for:
http://www.bellyfull.tv/
Any help appreciated, thanks for you time
Drawing Lines In A Scrollbar
Please see the attached fla.
I am drawing several lines which progresses in horizontal direction.
I want that as the number of lines increases a scrollbar should come into the picture so that the lines which are getting lost when the movie clip size finishes can be seen in this scroll bar.
Thanks
PS: I know that I have to place the movie clip in the scroll pane and set the horizontal scroll to be auto, but I am not sure how to do that so please explain clearly
Drawing Curved Lines
I have movie clip called lines.
I will add some little circle movie clips inside of that, with instance names.
What i want to do is, to link each movie clip with the same instance name to each other, by curved lines.
For example, i have 3 circles (same movie clip) with the same instance name "circle1", 2 circles (same again) with the same instance name "circle2", and 4 other circles (yes, again the same movie clip) with the instance name "circle3".
I want to link all the "circle1"s together by hairline curved lines.
If this is not possible, simply, what is the way to draw an actionscript coded curved line between 2 circles with different instance names ? (circle1, circle2)
thanks.
|