I’m working on a Flex front end talking to a Crestron backend – and one of the things we’re doing is creating templates of different devices, one being a family of Crown amplifiers, each of which might have 2, 4 or 8 channels of audio to display. Each channel starts out with a Crestron join, but the next channel up it’s join begins at 21+ from the previous channel’s (if you know Crestron you’ll know what I mean).
What I love about the extensibility of Flex and it’s MXML Components: I’ve created one channel with all it’s internal joins as private properties. The parent amp template has only one property it needs to keep track of – channelCount – and I instantiate channels on the fly and only tell them their channel – both to display information (ie ‘Channel 1’) but also so each channel can remap it’s internal joins to send and receive the correct information – ie (channel-1) * 21 basically gives each channel’s subitem it’s join. All they have to do now is listen to the Singleton I’ve created for communicating to Crestron and they get their values by the event broadcast. Very cool. Also have to add I love how easy it is to make things pretty. Just these few lines:
Give me these nicely animated volume controls by merely controlling the height of the mask.