<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>drawArrow()</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=156084708-03092007><FONT face=Verdana
color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=156084708-03092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=156084708-03092007><FONT face=Verdana
color=#0000ff size=2>drawArrow was added to support the drawing tools. It always
draws arrows at 0,0. You can of course set the _x and _y of the clip / icon you
are drawing into to position the arrow, and to</FONT></SPAN><SPAN
class=156084708-03092007><FONT face=Verdana color=#0000ff size=2> rotate it you
can set the _rotation property of the movieclip. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=156084708-03092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=156084708-03092007><FONT face=Verdana
color=#0000ff size=2>You might want to look at arrowTo(x1,y1,x2,y2,[size],
[spread]) which conveniently connects two points with an arrow. Size and spread
are optional, but control the appearance of the arrowhead. Size is the length of
the arrow head from its tip to its base, spread is an angle in radians that
defines how sharp the arrow is. If you want to do this calculation in degrees it
would be:</FONT></SPAN></DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff
size=2>ar.arrowTo(100,100,300,100, 20, 45 * Math.PI / 180); //creates an arrow
with a 90 degree point, as spread applies on each side.</FONT></SPAN></DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff size=2>Play
around with the values to see what you like best,</FONT></SPAN></DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=156084708-03092007><FONT face=Verdana color=#0000ff
size=2>Julian</FONT></SPAN></DIV>
<DIV dir=ltr align=left><BR></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Paul
Swanson<BR><B>Sent:</B> 31 August 2007 19:36<BR><B>To:</B> Xerte discussion
list<BR><B>Subject:</B> [Xerte] drawArrow()<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Sorry to post so many questions lately. Can anyone
enlighten me on the following?</FONT> </P>
<P><FONT face=Arial size=2>I found that I can draw an arrow with code, but I
can't find a list of the arguments the method takes. If I use the following to
create an arrow:</FONT></P>
<P><FONT face=Arial size=2>arrow2.lineStyle(2,0xFF0000,100);</FONT> <BR><FONT
face=Arial size=2>arrow2.drawArrow(100,100,300,10);</FONT> </P>
<P><FONT face=Arial size=2>I get a red arrow that is 300 pixels long and 10
high, but it seems to start at x=0 y=0, no matter what I use for the first two
arguments, even if I use empty strings in place of integers. And I imagine
there is an angle argument. Is there any documentation anywhere that lists
what these arguments are? I've been Googling all morning and haven't found
anything.</FONT></P>
<P><FONT face=Arial size=2>I know I can use moveTo() and rotateTo() to
position the arrow, but it would be nice to know what arguments the method
takes, or where to look for this information.</FONT></P>
<P><FONT face=Arial size=2>Thanks!</FONT> </P>
<P><FONT face="Courier New" color=#808080
size=2>_____________________________</FONT> </P>
<P><FONT face="Courier New" color=#808080 size=2><B> Paul
Swanson</B></FONT> <BR><FONT face="Courier New" color=#808080
size=2> Instructional Designer</FONT> <BR><FONT face="Courier New"
color=#808080 size=2> Harland Financial Solutions</FONT> <BR><FONT
face="Courier New" color=#808080 size=2>_____________________________</FONT>
</P></BLOCKQUOTE></BODY></HTML>