ReleaseOutside

Sounds like something a dog would do. Anyhow, this functionality is missing from AS3, but it can be recreated. Essentially, I have allowed for the dragging of modules over the top of each other (hmmm. I just thought of something. Maybe I should make them not able to overlap) Anyway, that new thought aside, I’ve made it so that even if you overlap a module, or underlap, when you release the mouse, the button, for instance, will now turn off, rather than staying in the on position like it used to. The more current problem is creating connection and frankly I’m stuck. I’ve created hit areas (I’m not even getting into finding the correct input and output yet.) on the left and right side of every module. when you mouse down on the right side and drag, a line will run from the right side of the module to your mouse. If you release the mouse, the line dies. What I can’t do is figure out how to tell if you’ve dropped the line in the left input of another module. The code that detects the inputs and outputs is in the module class and what I can’t figure out is how I need to reference the two modules I want to connect.

This movie requires Flash Player 9

Posted in AS3

One Reply to “ReleaseOutside”

  1. I can see where overlapping modules might be useful, particularly in the scenario I suggested earlier where modules could be displayed or hidden based on an input. On the other hand, it’s not unreasonable to insist that modules not overlap while being wired.

    Along these same lines, I wonder how difficult it would be to allow selected modules to be treated collectively as a block. This block would move all associated objects simultaneously. Also, it might be nice to have some tools that would allow modules to be aligned and spaced evenly, come to think of it. Anyway, one of the features of the block would be to allow its constituent modules to be displayed or hidden.

Leave a Reply

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