Finally, Visable Lines

Finally you can have your connections and eat them too. Or see them anyway. I’ve selected a nice red dashed line for the “pre-connection” wire. I hope you like it. In this version (0.1.99) I’ve also fixed some problems that cropped up when I created the lines.  For modules that were in front of other modules (z depth), when you dragged the wire over the left input area of the intended module, it wouldn’t activate the input area -I think because the line (which is part of the first module) was in front of it.  So…now, when you start a new connection, it moves the parent module down to the bottom of the display stack. When just dragging a module, I decided to pull it up to the top of the stack.

I played briefly writing my own dashed line class, and actually wrote a very simple function that drew the connecting line with 10 equally sized dashes and spaces (which scaled as you drew it), but then I found the wonderful dashed line class below:

http://www.cartogrammar.com/blog/drawing-dashed-lines-with-actionscript-3/

This movie requires Flash Player 9

Posted in AS3

2 Replies to “Finally, Visable Lines”

  1. I like it! Input connections still seem to keep “accumulating” even after a connection is erased, though.

    What’s the fps indicator all about — 55.6fps?

  2. I know. I’m working on it. It has to do with how the connections are logged.

    I have set the frame rate to 60 fps, so anything less that that indicates you’re CPU is straining to keep up. I’ve usually found that it’s more to do with something else going on on your computer and less with your ability to run the flash.

Leave a Reply

Your email address will not be published. Required fields are marked *