Connections: Take one

So like last time, i’m starting by hard-wiring a connection to start with, then I’ll go back to how to create them dynamically.   And since my last post, I’ve rethought the connections questions and I’m going to make it more outside in, rather than trying to figure out some hacky way of having children and grandchildren telling parents what to do. So… to that end, I created a neatWorkspace class. Structure as follows:

Workspace is the parent of everything (so far). It has children button and LED. They have children input and output (or in buttons case, inputs and outputs) Workspace also has a child Connection A, which contains a reference to button and LED, and which output of button will be connecting to what input of LED. Connection A has a child neatWire (the graphic connection) which is a line from button output, to LED input.

This movie requires Flash Player 9

the wires fail if you try to create new ones by dragging out lines, but they’re just holdovers, I haven’t revisited them yet.

Posted in AS3

Leave a Reply

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