Posted in April 2007

Can’t-Wait Apollo Features

by

I was just working on a good way to flexibly manage my application’s document windows in Apollo, and when I started trying to throw real windows up, I ran into a wall. The windowing docs clearly showed an example of adding display objects right into the stage of a NativeWindow, but I wasn’t able to spawn windows with views in them. After banging my head for a while, I found the note cleverly hidden at the very top of the asdocs with a bold “Important”! Those tricky Adobe technical writers. Anyway, you can add in an HTML view, or display objects, but apparently those windows run their own instance of Flash Player: you can’t just add in Flex components. I would be curious to find out if cross-window scripting is also impossible now. I would guess so. I’m guessing that getting a unified Flash Player execution environment across native OS windows in all supported OSes is a challenging hurdle (to say the least).

At least mine eyes did not deceive me about the other feature I really am looking forward to, native menu bar support. This is more of an issue for the Mac platform since menus are already grouped with the main application window in Windoze.


So these two limitations kind of throw a wrench in what I was trying to do… I guess I’ll do the Windows 3.1 thing and have one big window with a window-docked menu, and containing the document windows as children. The document windows and menu will both be standard flex components within the main Apollo window. Anyway, I’m looking forward to the next public alpha rev! Hopefully it’s on its way :)

Update: I was thankfully wrong about cross window applications, even in the alpha. Adding Flex components requires a pretty straightforward workaround. Daniel Dura’s approach. Todd Anderson’s approach. Ask (a stupid question) and ye shall receive (an answer from the internets)!

Update: Native window saga part two, part three.

(pseudo) Abstract Classes in AS3!

by

(Since we’re MXNA’d now, I wanted to bring this post and maybe a couple of others back up to the top by reposting them. This was written back in October)

I was looking at this blog post by Tink about more strict Abstract constructors in Flash using Errors. I worked out a way that is a bit more formalized. It adds support for abstract methods and unlike Tink’s example, doesn’t require you to type out the string of the class name.

Continue reading

Dynamic Text Wrapping in ActionScript 3

by

Recently, I received comps for a project in which the text appeared to wrap gracefully around an isolated (against a solid background) image, as if it were laid out in a prepress tool like InDesign. Rather than wildly waving the comp in the designers’ faces, tears streaming, convincing them by my incontrovertible pathos to drop the feature, I took some extra time to see if it was possible to do that with decent performance and arbitrary text, given AS3′s new features. Some of the bugs I ran into made me cry anyway, but I think I finally got it figured out.

If you see this message, you need to install Flash Player 9.

You may want to open it up on its home page here, especially if you are getting crossdomain errors from viewing on Mims’ flava of the blog. To see how this is accomplished, read on past the cut.
Continue reading