Here is a recent code snippet I wrote to draw dashed lines in Actionscript (I am using it in Flex). Very cool. I’m displaying it using the new “Snipt Embed” functionality from Snipt.org, pretty neat!
I'm enjoying commenting more and more now. it's a nice pass time. I like this post. I think disqus is one demonstration as to how important commenting is.
Tim
you could also use this for a horizontal dashed line (and the same for vertical but flip the x and y in the loop and moveto/lineto values)
public function drawHorizDashedLine(startX:Number, startY:Number, endX:Number, endY:Number):void{
var line:UIComponent = new UIComponent();
line.graphics.lineStyle(1,0xff0000,1,false,"normal","none");
var gap:int=6;
for (var i:int = startX; i < endX; i = i + gap ) {
line.graphics.moveTo( startX + i, startY);
line.graphics.lineTo( startX + i + gap / 2, endY);
}
addChild(lineparent);
}
Wow, the size of navy's intranet is second only to the internet - HP Holds Navy Network âHostageâ for $3.3 Billion http://gizmo.do/93Rs8B...2010/09/01
hahah is it just me or does the google "priority inbox" promo music sound like star wars cantina? http://t.co/MEKIeuN...2010/08/31