Adobe Dreamweaver Forums



Last 10 THreads :         Re: Colour differences on the web (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          cs4 full screen mode isn't saved in workspaces, unlike cs3 (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 1 - Views : 2 )           »          help me with adjustments layers in CS4 (Last Post : eddie caruso - Replies : 5 - Views : 6 )           »          delete all channels previously created by "save selection" (Last Post : John_A_Horner@adobeforums.com - Replies : 2 - Views : 3 )           »          Just a small 3D project I have completed (Last Post : Ziggi - Replies : 0 - Views : 1 )           »          Change custom Vector class to new Vector class in player10 (Last Post : VarioPegged - Replies : 3 - Views : 4 )           »          CS4 Motion Editor issues (Last Post : aaronlyon - Replies : 2 - Views : 9 )           »          Looping through results with "Next" button (Last Post : Fetch - Replies : 1 - Views : 2 )           »          Writing a Dreamweaver Extension, where to start? (Last Post : Randy Edmunds - Replies : 1 - Views : 2 )           »          Focus, Browsers & Spry Accordion (Last Post : Randy Edmunds - Replies : 6 - Views : 7 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 05:04 AM
v-Jay
 
Posts: n/a
Diggs:
Default how to create a line with pointed head

Hi,
In my application i need to draw line with pointed head, I don't know how to define custom line with pointed head.

Is there any solution, Please reply.

Thank you


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 12:14 PM
RUSH-ME
 
Posts: n/a
Diggs:
Default Re: how to create a line with pointed head

Hi, add this function after drawing the line

public function createArrow():void
{
var angle:Number = Math.atan2(getY2()-getY1(), getX2()-getX1());

graphics.lineTo(getX2()-arrowHeight*Math.cos(angle)-arrowWidth*Math.sin(angle),
getY2()-arrowHeight*Math.sin(angle)+arrowWidth*Math.cos(an gle));
graphics.lineTo(getX2(), getY2());

graphics.lineTo(getX2()-arrowHeight*Math.cos(angle)+arrowWidth*Math.sin(an gle),

getY2()-arrowHeight*Math.sin(angle)-arrowWidth*Math.cos(angle));

}

getX1(), getY1(), getx2(), getY2() are the start and end points of the line

Hope this will work for you.

Reply With Quote
  #3 (permalink)  
Old 11-05-2008, 08:53 AM
v-Jay
 
Posts: n/a
Diggs:
Default Re: how to create a line with pointed head

It works, Thanks
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:38 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk