Thank you guys for replying me soon..
it really help me.

thanks


On 8/11/06, Florent JEAN <[EMAIL PROTECTED]> wrote:


Hi,

Here is how I draw vector arrow (it's an extract of a more complete vector
renderer class):

/*****************************************/

import flash.geom.Point;

//Parameters
var p0:Point = new Point(100, 100);
var p1:Point = new Point(200, 200);
var arrowWidth:Number = 4;
var arrowHeight:Number = 8;
var _thickness:Number = 2;
var _rgb:Number = 0x660000;
var _alph:Number = 100;
var _buffer:MovieClip = this;

//Line style
_buffer.lineStyle(_thickness, _rgb, _alph);
//Draw the line p0 -> p1
_buffer.moveTo(p0.x, p0.y);
_buffer.lineTo(p1.x, p1.y);
//Get line angle
var angle:Number = Math.atan2(p1.y-p0.y, p1.x-p0.x);
//Drow the arrow
_buffer.lineTo(p1.x-arrowHeight*Math.cos(angle)-arrowWidth*Math.sin
(angle),
p1.y-arrowHeight*Math.sin(angle)+arrowWidth*Math.cos(angle));
_buffer.lineTo(p1.x, p1.y);
_buffer.lineTo(p1.x-arrowHeight*Math.cos(angle)+arrowWidth*Math.sin
(angle),
p1.y-arrowHeight*Math.sin(angle)-arrowWidth*Math.cos(angle));

/*****************************************/


______________________
Florent JEAN
http://www.nowhen.net


> -----Message d'origine-----
> De: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] De la part de Rutul Patel
> Envoyé: jeudi 10 août 2006 17:31
> À: Flashcoders mailing list
> Objet: [Flashcoders] need help in drawing arrow
>
> Hi people,
> anybody know how to write AS of drawing arrow.
> if anybody has can anybody tell me how?.
> thanks
> Rutul Patel
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
Regards,
Rutul Patel
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to