I don’t know what you want to call it, but I wrapped up the rest of the properties panel and plain vanilla code gen. VERY minimal testing, so let me know what breaks, as I’m sure something will.
Tomorrow I’ll probably add support for an option to generate a full class as well as the list of components as you see now.
After that, I’ll release the source, but I warn you, it’s pretty ugly. Long lists of if/else and switch statements. A sweet target for some refactoring with some strategy pattern, but I’ll leave that up to anyone more ambitious than me. If anyone wants to tackle containers while they’re at it, I’d welcome it. 🙂
Read more...Go check it out!
https://www.bit-101.com/MinimalDesigner/
Still lots to do. As far as the properties panel goes, the first column should pretty much work. The second column partially works. The others, not at all. As far as code generation, it just generates a list of the components with constructors and sets any properties (right now only width and height, as needed). Eventually, I plan to make it generate a full class. Also, you have a limited list of components to work with. No container classes (Panel, Window, HBox, or VBox) yet, and none of the more esoteric components. But this should be enough to do some basic layouts, which will actually compile. 🙂
Read more...Ooh, look what I am playing with…

Am I the only one to notice a gigantic gap in the Flash Platform? I’m talking about the lack of AS3-only UI components.
Currently there are three main ways to create a Flash application.
Use Flex and MXML in Flex/FlashBuilder (or mxmlc and your favorite editor/ide).
Use the Flash IDE.
Use AS3 in Flex/FlashBuilder (or mxmlc and your favorite editor/ide).
In option 1, you have the vast and awesome set of Flex components.
Read more...A few things I have in mind for the components:
– A tick property on the sliders. Currently, you can set the label precision which is ok, but it doesn’t affect the resulting value of the component. So you might see 2.1, but the value you get is 2.13459834.
– Integrating the new VBox and HBox to Panels and Windows. I imagine they would have a property something like “layout”, which could be vertical, horizontal, or free. Perhaps default to vertical.
Read more...Long overdue, a couple of simple layout containers. HBox and VBox. You just create them, add components to them and they lay out the components vertically or horizontally. You can adjust the spacing. I had to go in and do a bunch of tweaks to other components to get their widths showing up correctly upon instantiation. So you might notice some changes here and there. Mostly in the checkbox, radio button, and indicator lights. These components had width and height affecting only the graphic, not the label. So now, the graphics are a fixed size of 10 pixels, and the overall width of the components is 12 + the width of the label. Hopefully that doesn’t break too much.
Read more...Worked on this some more…
Read more...Just kicking back with some good old fashioned Flash experimentation.
Read more...I’ve been invited over to the MIT Media Lab this morning by Angela Chang, a student there working on her PhD dissertation on emergent literacy. She asked if she could interview me about my work as a game designer, in particular the types of visual or organizational techniques I use to draw people’s attention. Then she’s lined up a couple of hours worth of demos by other students who are doing things with animation, interactivity, social networking, etc. Apparently, a lot of people are doing some “strange things” with Flash over there: “building some connectivity modules for all sorts of networking protocols, controlling robots, and working on toys for autistic kids.” Should be really interesting. I’ve always admired some of the stuff that’s come out of the Media Lab, and although I used to work right around the corner at Brightcove in Cambridge, I never got to visit. Should be fun!
Read more...To celebrate my return to the world of Flash, here’s a new component to go into the Minimal Components set:

Quite simple, just two panels and a label, made draggable. I created a simple version for a level editor I’m working on for a game, and decided to make it a permanent fixture.
Here’s the code used to make the above scene:
[as]Component.initStage(stage);
var window1:Window = new Window(this, 100, 100, “Slider Window”);
window1.width = 200;
window1.height = 160;
for(var i:int = 0; i < 10; i++) { var slider:HSlider = new HSlider(window1.content, 10, 10 + i * 12); slider.width = 180; slider.value = Math.random() * 100; } var window2:Window = new Window(this, 150, 150, “Button Window”); window2.width = 120; window2.height = 260; for(i = 0; i < 10; i++) { var btn:PushButton = new PushButton(window2.content, 10, 10 + i * 22, “Button " + i); } var scw:SubclassedWindow = new SubclassedWindow(this, 200, 300, “Subclassed Window”);[/as] See? Simple. But I like how it looks. Fits in well with the other components. As with the Panel, just remember that it’s best to add subcomponents or other items to the content property, rather than the window or panel itself, as the content is masked. I suppose I could override addChild to do that for you, but… whatever. Also, you notice there that I created an instance of SubClassedWindow. That’s just a class I made for this example so you can see how you might want to do that: [as]package { import com.bit101.components.RadioButton; import com.bit101.components.Window; import flash.display.DisplayObjectContainer; public class SubclassedWindow extends Window { public function SubclassedWindow(parent:DisplayObjectContainer=null, xpos:Number=0, ypos:Number=0, title:String=“Window”) { super(parent, xpos, ypos, title); } override protected function init() : void { super.init(); height = 180; for(var i:int = 0; i < 10; i++) { var rb:RadioButton = new RadioButton(content, 10, 10 + i * 15, “Radio " + i); } } } }[/as] Technically, I probably should have added the radio buttons in an overridden addChildren method, but init works too. Anyway, from here, you could add event listeners and other stuff to the content of the window and have it all neatly packaged up in one class. Anyway, get the source or the SWC here: https://code.google.com/p/minimalcomps/