Flash Panel: ViewMaker

For those projects where you’re creating a plethora of Flash forms because you’re not using Flex, don’t use authortime layout, and are sick of writing the same types of code 14+ times in a row, hopefully this panel will make it go easier.

Typically, when you’re creating the View portion of your app, you can look at a comp, and go “That section has a Label component, a Button it uses twice, and a TextInput it uses about 6 times”. You then proceed to import those 3 classes, define their variable names, and code their creation and initialization variables in a createChildren function.

…you then repeat the process ump-teen times.

This panel provides a GUI to quickly add the controls, type their names, choose their type (all Flash MX 2004 control components are in there), add any other private/public/getter setter variables if you want, and then click “Generate Code”. It gives you some base level ActionScript 2.0 code with which you can copy into any class that extends mx.core.View. If you’re just extending UIComponent, you can do a find and replace for createChild to createClassObject, and add getNextHighestDepth() as the 3rd parameter.

There is a quick help tutorial included to show you how it works.

ViewMaker Flash Panel (Window SWF) – MXP | ZIP

Currently, there is a bug where if you manually select the control type via the ComboBox, it doesn’t show 1 of the form labels properly.. and if you select it by typing the first letter of the component name (when the ComboBox is highlighted and you type “b” for example), it doesn’t show up at all…. It’s a Flex thing, so trying to figure it out.

One Reply to “Flash Panel: ViewMaker”

  1. This is pretty interesting. How about code to insert into doLayout too. Say you wanted a combobox to expand to the right, and a checkbox to right-align itself to the view. You could expand this into a whole form/View class creator ;) Just an idea.

Comments are closed.