ActionScript 3.0 :: Draw Line Between Targets Within Different Objects?
Apr 19, 2011
I have 2 or more objects created dynamically on stage. Each object has other smaller objects as children (I called them targets).What I am trying to do is to draw lines between these targets.By the way, in the near future these parent objects will need to be drag around the stage and the lines will need to relocate to the new locations when the dragging is complete.But at this point I am having problems getting the lines to show up in the proper locations.So this first piece of code creates the targets and the second piece is where I am trying to draw the lines between targets. I tried to use localX and localY but I can't get it working.
Code:
function handleSubmitFile(evt:Event):void
{
var numberChoices:uint = mcAttribute1.comboAttribute.selectedItem.data;[code].....
View 1 Replies
Similar Posts:
Apr 5, 2012
I need to be able to draw a thick patterend line between 2 points in AS3, I can't use the draw API because it doesn't all me to actually put detail (pattern etc) into the thickness of the line, I thought about perhaps using the line to create a bitmap version and then using that as a mask, but I remember many years ago seeing some examples that use a movieclip as a source for a line.
View 1 Replies
Jun 24, 2009
draw a line on mouse movement, not the static line.
I am attaching a sample which is 90 degree bounded as it has been given in animation, I want to make this or such type through mouse movement.
View 2 Replies
Feb 3, 2012
I'm trying to produce a game that on mouse down a dotted line (or just a line) gets dragged out following the mouse until it is realized then it disappears.
View 1 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]...
View 4 Replies
Apr 13, 2005
I'm making a very simple game that lets you draw a curve by hand (using lineTo to the mouse position on mousemove) but now, I need to check wether the line intersects wiith another part of the same line (e.g. a loop)
I first used an onrollover command, and that worked, but not always because the mouse moved too fast (same with hittest with mouse). Then I pre-drawed the line in another mc, used hittest on it, and if it wasn't intersecting, draw it in the real mc. But that didn't work because it used the bounds to test. I guess the best way is to use some mathematical formula, but that would mean I have to save all my coordinates in an array..
View 5 Replies
Nov 27, 2010
i have tried a lot of time to make my project into a success.this is the link to my swf...all objects are accepted when i drop it into the plastic bin
var startX:Number;
var startY:Number;
var counter:Number = 0;
[code]....
View 3 Replies
Nov 27, 2010
i have tried a lot of time to make my project into a success.this is the link to my swf... all objects are accepted when i drop it into the plastic bin.URL..
View 1 Replies
Jan 27, 2011
I am designing a simple classify drag and drop game, but I got several objects and targets, for example square shape object can only go to square shape target, however when I have 2 or more square, then the square2 and square3 can not go to square target!
Code:
var objectoriginalX:Number;
var objectoriginalY:Number;
var counter:Number = 0;
triangle_mc.buttonMode = true;
triangle_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
[Code] .....
View 3 Replies
Feb 27, 2012
How do I provide a success message (perhaps with a dynamic text field) when the three objects have been dragged to their targets?
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
[code].....
View 2 Replies
May 2, 2006
how I draw a line through a path line? An example I have a movieClip that is a pencil and it is moving through a path line, now I want to draw the line that the pencil draw.
View 2 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
Oct 19, 2009
How do I draw a line across the USA starting in San Francisco in frame 1, moving through Kansas City in frame 5, and then extending to New York in frame 10. By frame 10 I'd like to see the whole line, representing the whole journey I took in my car over summer vacation.
I can make a "dot" do this in flash (ie without leaving a line trailing behind it) but I don't know how to make the line "grow" across the USA over time.
View 4 Replies
Jun 7, 2009
how to draw a simple line? Im not using designer (which means i call Document class method that ouputs everything).
View 2 Replies
Jan 12, 2010
i am trying to create a line that can be draggable and extedable from start and end points of line.
View 1 Replies
Dec 29, 2010
The Xml
<?xml version="1.0"?>
<root>
<route portStart = "USLAX"
portStartx = "2014"
portStarty = "433"
portEnd = "JPTYO"
portEndx = "1995"
portEndy = "456" />
[Code] .....
View 1 Replies
Feb 10, 2009
What is the simplest way to draw a 3d line? E.g. I want a vector from (0,0,0) to (50, 100, 50).Do I have to do it the old school way with maths or is there some new 3d drawing API? (I heard f10 had lots of new 3d stuff...)
View 4 Replies
Sep 24, 2009
I'm making a fishing flash game where you drop your hook off a boat and i want to draw a white line from the boat to the hook and the hook can move up and down so i want it to stay with the hook
View 1 Replies
Jul 16, 2009
I'm trying to draw this hint box and was wondering if anyone could explain to me how to draw a curved line like the one below in flash?
View 4 Replies
Jun 29, 2010
make two movable buttons connected with a line. When changing position of any button you'll change look of the line of course I know how to draw a line but after MOUSE_DOWN, and I don't know how to remove an old one line, and how make this line t be shown all the time?
My code
btn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);btn2.addEventListener(MouseEvent.MOUSE_UP,
[code]......
View 6 Replies
Aug 25, 2011
i need to draw a line at runtime, and i found this "myShape.graphics.moveTo(100, 100); myShape.graphics.lineTo(200, 200);" but don't know for sure how to declare myShape, i think it needs 2 lines to declare it properly, right?
View 3 Replies
Oct 31, 2011
Here is a video explanation:
[URL]
If I use the Pen tool and attempt to draw a line within a symbol, the anchor point on the other end of the line moves [out of my control] to the right. I'm not sure whether this is a bug or a feature, but I'm leaning towards the former; either way
Adobe Flash CS5Mac OSX 10.7.2
View 12 Replies
May 7, 2010
I want to draw a sharp ( not antialiased ) and dotted line with AS3 [code]...
View 2 Replies
May 9, 2010
I've got a simple flash file where I randomly place dots on the stage. I've used the lineTo() command to draw lines between the dots. Eventually I would like to place the dots in 3d space and draw lines between them then rotate the movie clip so you're looking around it. Is there anyway to draw a line in 3d space? either using lineTo() or another function?
View 3 Replies
Feb 22, 2011
I'm trying to draw a line that just keeps moving using just AS3. Like when a heart beat monitor flat lines. The reason is I'm adding this to arduino project so when you breath into an alcohol sensor the line will move up if you have been drinking. I just want to be put on the right path.
View 1 Replies
Oct 6, 2005
I know how to draw straight line using Actionscript but my problem is...how to draw this type of line using actionscript...
[Code]...
View 1 Replies
Nov 24, 2006
Dose the Flex has some Tags just like <v:line> or <v:polyline> in VML?
View 1 Replies
Aug 10, 2009
I have moving movie clip on stage and I want to draw a line so that it fallows my MC.
PHP Code:
var sp:Sprite =new Sprite();
addChild(sp);
[code]......
View 2 Replies
Apr 22, 2010
I have a number of sphere's which have random x, y and z values.I thought it would now be simple to create a vector with the x,y,z coordinates on the spheres I want to connect and that would be that.However the vectors remain in the 2D plain.
View 1 Replies
Nov 2, 2010
My requirement is to draw a line linking two places in a map, starting from one point to other. The growing line may be either straight or curved line.
View 1 Replies