Draw lines with your mouse

I was scratching my head on this throughout the morning. I added rectangles to the scene when running via AS 3.0. I drag these rectangles on the scene. Now, I would like to use a method to click on one of these rectangles and draw a line to nowhere else on the scene - ideally another rectangle. I thought to use RIGHT_MOUSE_UP and RIGHT_MOUSE_DOWN, but those don't seem to work on Mac using the magic mouse. It is considered to be a left click. Someone at - it any example of code that can do what I'm looking for?

Thank you!

ensure that:

var clickNum: int = 0;

stage.addEventListener (MouseEvent.CLICK, clickF);

function clickF (e: MouseEvent): void {}

{with (this.) Graphics)}

lineStyle (1, 0xff0000);

If (clickNum % 2 == 0) {}

moveTo (this.mouseX, this.mouseY);

} else {}

lineTo (this.mouseX, this.mouseY);

}

}

clickNum ++

}

Tags: Adobe Animate

Similar Questions

  • Drawing line with the mouse clicks on picture indicator

    Hello

    I need to import a JPG file in an image control, draw a line in 2 clicks, read bothe XY positions and perform some basic trigonometry. Any simple or striaghtforward way to draw the line with the mouse and read thos passay on the bitmap (positions relative pixel)?

    Thanks in advance,


  • laptop HP pavilion 17 64-bit: draw lines on your desktop

    can someone explain how to draw lines on the desktop? I am currently working on a project that requires lines to be drawn on some of the pictures on the desk. to make things more complicated, I don't use a mouse, and my computer has not left and right click buttons! He has a very sensitive touchpad, so there is not to hold a left or right button as possible on most computers. so, for the moment I tenderly your help there, to try to solve this problem. If there is a solution, that is! I have to admit that this is something new for me, but you live and learn to do not you?

    Thank you very much in anticipation.

    Glad to hear the clicks of mouse work for you about the graphics program, it seems that you need something which will give you a fairly accurate line length measurement while you draw the line is - that correct? Photoshop Elements can meet your needs. In my opinion, it costs about $80.

    In Photoshop Elements, while using the online tool, it gives you a measure of angle in real-time and (to the thousandth inch) length of the line you draw. Here is a picture to demonstrate:

    Only a slight glimpse of the line appears while you actively draw, then the complete line appears after you release the mouse button. You can customize the line to any desired pixel width. Each new line creates a new layer 'Shape' on top of your image, which can then be resized or moved or otherwise handled, according to the needs.

    I hope this helps. Your assignment seems deceptively simple please let me know if there is anything else I can do to help.

  • Having a problem to draw lines with arrows

    Hello

    Maybe it's a bug/clitch side Illustrator and possibly without my knowledge.

    Every time I have to draw a line and put a race with arrowheads - everything works as it should.

    When I want to preset stroke and the tips of arrows and to draw the line with them – applies only the race but spikes are not applied, when I check options of race that I see other options that I set myself, but for arrowheads unset/no applied as they appear.

    I really need to shoot a lot of lines of the arrow and it would be too much of a hassle to manually set the arrowheads to each line.

    Hope you can help.

    Best regards

    Alari

    Alari,

    You can turn off between the appearance of maintaining Art new and new Art has basic appearance to this button in the appearance palette.

  • Draw lines with smooth curves

    Hello

    I am doing a map for an underground system in a gaming PC, and I want something similar to a Transport for London has:

    http://www.tfl.gov.UK/assets/downloads/standard-tube-map.gif

    I am a total newbie with Adobe Illustrator, but I try it as I have heard that this is using Transport for London.

    My question is then, what would be the best way to accomplish several lines with different colors and smooth curves, like the lines in my table of reference?

    Thanks in advance,

    Martin

    Martin,

    Complete what by says Kurt, you can draw traces with segments of straight lines and then cut corners later, using the effect > styles > corners (you can object > decaying appearance in order to get real rounding).

  • How to draw lines with hard edges?

    When I draw a line in photoshop creates a Fuzzy contour autour the line that does not when I draw le line in the paint . How to make J’ai achieve the same solid line in Photoshop?

    Thank you very much!!

    Photoshop

    screenshot3.png

    Paint

    screenshot2.png

    For the effects of stairs turn off anti-aliasing when you use the tool online

  • How to increase the font in the menu when you right click with your mouse?

    Hello

    I want to enlarge the right click menu

    as the menu begins by opening a link in a new tab

    Try this code in userChrome.css below default @namespace.

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #mainPopupSet menuitem { font-size: 13pt !important; }
  • I have a problem with the mouse on the computer.

    Original title: the mouse is runging autour

    Help

    I can't control my mouse
    He does things on his own

    Hi Zooitje,

    Thanks for posting your question in the Microsoft Community.

    From the descriptions of the question, it seems that you are facing problems with your mouse.

    I imagine the inconvenience that you are experiencing. I'll help you fix the problem.

    To help you solve the problem, I would appreciate if you could answer the following questions:

    1. What is the brand and model of the computer and the mouse?

    2. have you made any recent hardware or exchange of software on your computer before the show?

    3. you receive an error code or message?

    I suggest you run the troubleshooter and update the drivers by following the steps in the link below and check the issue.

    Mouse, touchpad and keyboard with Windows problems:

    http://Windows.Microsoft.com/en-in/Windows/help/Mouse-touchpad-and-keyboard-problems-in-Windows?T1=tab04

    I hope that the information above helps you.

    Your response is very important for us to ensure a proper resolution.

    In the future if you fall on any question relating to Windows, please do not hesitate to post your request here on Microsoft Community, we will be more than happy to help you.


  • Draw straight lines with Photoshop and the Wacom Tablet pen?

    Hello
    I was just wondering how to draw straight lines using pen Wacom Intuos and Photoshop. I was hoping there was an a little sovereign tool or something that will help you with it but can not understand. Thank you ahead for your help with this.

    Same as with a mouse. Click once on one end of the line the shift click on the other end of the line.

  • How can I draw a straight line with a brush?

    I know that the pencil tool can draw a straight line with anchor points. Is there a setting for the pencil tool which can mimic a brush of 30 points, low hardness (from left to right) at an angle of 80 degrees, or is it possible to make a straight line with the Brush tool using a mouse?photoshop help.jpeg

    I know that this picture is a little blurry. what I want to do is to replace the 2 lines of white angles with point 30 brush effect 230 pixels wide. the project on the left side of the photo is a canvas 4 ' 2 ft. any ideas? Help, please.

    Straight lines are simple: the brush, click where you want the starting line (you will paint one place) then hold down the SHIFT key and click where you want the line to end. Photoshop will draw a straight line between your departure and arrival.

    In addition, for even more control, you can use the pen tool to create a path, then just STROKE the path with the brush.

    Mike

  • Illustrator CC 2015, need to draw the line after line with arrowhead already attached.

    CorelDesigner has an option where you just draw your line / lines and arrow is already added at the end of the line.  Not only that your arrow lines can have a color outside the line (which surround it). So if you make a technical with arrows pattern when placed on top the drawing there is white or what ever color you want outside the black line (what thickness you choose so) so it's easier to read the technical drawing. So, basically, it's not line against line. That's why you would put a little white around the line. He gives him the space to breathe and easier to read the technical drawing. In Illustrator, I find that I draw my line. Then hover over the line options palette, and then scroll down arrow heads and choose my arrow head. Then calculate the rest, make outside the line have a white that surrounds it. Thus, it can be placed on technical drawings. I find there are many steps I have to do when Corel has this feature built-in and you leave. I currently have a trial version of Corel. But... I already have Adobe Suite. I don't want to have to buy another program. But I also see that CorelDesigner is somehow more user-friendly for people who need to work with drawings technical line (writing). I understand that not every program offers the same tools. But I really need the speed of it because I work with a lot of technical CAD which are handed to me. If there is a way in Illustrator to draw my lines one after the other with the arrow head already attached? Then of course I need little white around it if its duplication on other technical lines.  It just seems like a lot of steps in Illustrator. I also understand I could draw a line w/arrow attached installer as I want. Then draw another line... use the eyedropper tool and click on the correct line and my other line with change. Once more... what a pain. I feel that I have to jump through hoops to get my final result. I hope so that there's something built in Illustrator, I did not know was there and just unnoticed.

    Yes, I was able to do, but this is delicate (buggy) to get there.

    Make sure that the two traits have identical points of arrows and line widths.

    After you have created your effect of offset on long-distance running, move the effect of shifting way somewhere else in the stack, and then put back where it was. This seems to be the only way to make it work. Weird.

  • How to draw and edit double lines with Adobe Illustrator?

    I need tot draw road maps. This should be easy with the pen tool, but my problem is that I can't find a way to draw a double line with this tool. I've seen a lot of models and fancy border styles. Some do not have the lines double or even quadruple, but the problem is that they have an offset from the vector line and the space between the two lines (the edges of the road) cannot be filled. Somewere I also found a few pens called "Double line 1.1' to ' Double line 1.6' but they also had an offset from the vector and I could chance not regardless of the size of the lines and the interval between them."

    I'm looking for is a way to draw two lines in parallel and have tot option fill out the space between the two with a color or even a model.

    The color and the size of the lines should be variable to distinguish between several types of road.

    Y at - it a game's existing pencils for this? It would be nice to be able to attract not only the roads, but also railways and rivers!

    I'm certainly not the first person who needs to do that?

    I use HAVE version 6

    Here is a picture. You can adjust the color of each stroke by selecting the line in the appearance Panel, and then change the color in the little box. Your best bet is to save the appearance as a graphic Style, so you can apply it to any line in the future. Not necessary for a brush and easier to change.

  • Draw lines in PS Non-taper - CS3 with Intous pads (4)

    I tried to draw a straight line that is not with my brush tool or pencil. Now if I click on the canvas and hold SHIFT it gives me a straight line, but departure is much bigger than the rear of the train. I would like to be able to draw a line with a width throughout.

    I am an expert user of photoshop, but I just got this new Tablet from Wacom Intuos. The problem occurs with the stylus. If I do the same right line click on shift with my mouse is a constant width.

    I searched all over the internet for help with this question and can not find. Please Hel

    Uncheck the dynamically in the brush Panel.

  • with the auto more recent updated version of firefox now there is a white bar that appears when you move your mouse over this area. I want that gone, how?

    When you move your mouse below the address bar opens a white bar, making it so you can't click on buttons or links on sites, like buttons connection for example. also when using the full screen, you can no more mouse on the tabs at the top of the screen, only this white bar appears. This prtty much kills its use full screen for me. Thus, this white popup bar and mode full screen with the white bar without tabs firefox has pretty much ruined it for me. in any case to fix it would be great.

    Launch Firefox in Mode safe

    While you are in safe mode;

    Firefox Options > advanced > General.

    Find and stop using hardware acceleration.

    ===================================

    Hello

    To better help you with your question, please provide us with a screenshot. If you need help to create a screenshot, please see How to make a screenshot of my problem?

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem.

    Thank you!

  • Scrolling with the mouse on the pages to create black and white, lines

    When scrolling with the mouse, periodically the entire screen turns into black and white lines. Page sometimes together, sometimes just from ads pictures/side. If you continue to scroll disappear but you need to scroll to where the lines have begun, it's hard to explain, I took 1 picture of the problem but will have more photos that I can, I love how Firefox works on my computer, it has always been the best browser for my needs. I recently bought a new desktop computer, but he did so also, so I deleted and tried to launch the Explorer and Google and I don't like, so I hope that we can settle this problem.

    I don't know if it solved the problem, but he didn't precisely these days. Thank you

Maybe you are looking for