I ran into a problem today that had me scratching my head for a bit. Suppose you have a large flash project that loads a number of external SWFs. Suppose furthermore that several of those SWFs, as part of their default behavior, instantiate display objects from within their own libraries. Let’s get more specific.

Take this example. Map.swf has a symbol in its library (a Bitmap) exported as “MarkIcon.” If in the constructor I add the following code…


public function Map() {

addChild(new Bitmap(new MarkIcon(50, 50)));

}

…my SWF has no problem correctly displaying its image. Pardon the awful graphics. This is for demonstration purposes only.

What happens when I later try to load this simple SWF into another SWF?

We get a compilation error of course. This sounds like a big problem, doesn’t it? What could we possibly do to fix this? We instantiate via the child SWFs applicationDomain property. Huh?


public function Map() {

var miDef:Class = this.loaderInfo.applicationDomain.getDefinition("MarkIcon") as Class;

addChild(new Bitmap(new miDef(50, 50) ));

}

Now it works everywhere. This same technique can also be used to instantiate the class from within the parent SWF. How’s that for fancy?

Categories: Actionscript 3ArticleTipsTutorial
Published: 08.10.10 :: No Comments »


The two images above both depict the “People” sections from their respective agencies websites. Pages like this are generally used, first of all, to name the important players in an agency, and second of all, to humanize the people you will hopefully eventually be paying for creative work.

What’s the significance of the juxtaposition of these two images?

The company in the first photo employs almost as many people as are depicted in the second.

Categories: AdvertisingArticleBugs
Tags:
Published: 08.08.10 :: No Comments »


I’d like to take a moment to draw your attention to a very useful class that’s been around for some time, but that I’ve never really bothered to use: flash.system.Capabilities. It gives you all kinds of useful information about the environment your SWF currently resides in. I’ve got an example below.

The SWF above (with any luck) should tell you whether or not you’re running a debug version of flashplayer, who the manufacturer of your flash plugin is, what operating system you’re running, what player type you’re using (should be plugin on this page), and what version of the flash player you’re running.

If you download the files for this demo here and run the SWF on your local machine, you should see a different value in the player type field.

The player type is the most useful piece of information to me. In theory you could use it to load different data or behave differently in general depending on whether you’re viewing your SWF in the Flash IDE or on a webpage, without having to add your own obnoxious boolean “debug” flags.

Categories: APIActionscript 3ArticleDocumentationDownloadsFlashTips
Tags:
Published: 08.05.10 :: No Comments »


I’m pleased to formally announce the relaunch of my portfolio at www.agitcraft.com. It’s been a long,  winding, mostly poorly organized effort on my part consisting of numerous missteps and restarts. I’ve technically been working on this iteration of the site for about 4 months (from scratch), although I’ve been grinding away at redesign efforts both with this domain and with my previous portfolio at altpixel.net for well over two years now. To give you a vague idea of how long this has been brewing, the svn I’ve been working out of is currently in revision 381 after going through at least 4 branches, and I’m the only person developing this.

I’d also like to take this opportunity to give credit where credit is due:

  • Jack Doyle for the greensock tweening platform (which makes all the animation in the site possible), without which I’m sure I would have gone crazy long ago.
  • The entire Papervision3d team for their excellent 3D package, which powers the 3D “solar system” motif that I use to display my interface.
  • The team of developers who’ve thus far worked on as3syndicationlib. There were a couple issues I ran into, but they were minor in the long run and they certainly don’t take away from the fact that I was able to parse and consolidate 5 feeds in real time with only a few lines of code. Awesome!
  • The developers of PureMVC, for making a framework that has literally changed the way that I work on large projects and made my site possible.
  • Matt McInerny at the League of Movable Type for providing the fantastic “Raleway” typeface I’m using both in my logo and for section headers.
  • An anonymous sound fx provider at flashkit.com for providing the ominous intro tune that plays when the site loads. I say anonymous because I was inattentive when I grabbed the audio and forgot to take note of the name/location of the file I snagged. I dug around today but could not, for the life of me, find the file on there. If anybody recognizes it let me know and I’ll give a proper shout out.

The wealth of libraries and tools freely available is part of what makes Flash such an exciting platform to develop for. I certainly could not have completed a project of this scale without them.

Anyway, if you like the site let other people see it. If you have problems with it let me know. I’m hoping this remains a growing work rather than a one-off showpiece.

Published: 08.02.10 :: No Comments »


Categories: AnnouncementsArticle
Tags:
Published: 07.22.10 :: No Comments »


The chart above is just a sample of one of the reasons I remain skeptical of HTML5 going into the future. The table above lists support for new form attributes. It’s hardly the only table of this sort with this many obvious conflicts. As a developer, how the hell can I be expected to navigate this sort of information? Headaches will abound…

Categories: ArticleDocumentationHTML5
Tags:
Published: 07.20.10 :: No Comments »


It’s time to speak about a problem that’s been troubling me for quite a while now. Flash CS4 (and certainly versions that precede it) seems to have major problems consistently and accurately rendering text. I’ve prepared some screen captures that demonstrate the problem.

Text Field Properties

It all begins innocently enough. I’ve created a text field on the stage and I move over to the properties panel to toy with it. In this case, the text field uses Arial Regular at 12 points as its font. It’s anti-aliased for readabilty, and it’s selectable.

Embedded Characters

Although I don’t expect that any of my viewers will be without Arial, I embed the font all the same. I make a broad selection of characters that should cover most if not all of my use cases for this text field, without embedding everything.

Editing Text

Now that I’ve configured my text field, I select it on the stage and put in some standard lorem ipsum to test my application with. Everything up to this point seems fine…

How Text Renders

…until I finish editing the text. Now that I have it selected, but am no longer editing it, everything has changed. Compare this screen capture to the one that precedes it.

This problem is not new. It’s particularly pernicious when you’re trying to align other objects with on-screen text.

Categories: ArticleBugsFlashTypographyUncategorized
Tags:
Published: 07.06.10 :: 2 Comments »


Perhaps you, like me, have had a need, at some point or another, to parse RSS feeds in Actionscript. If so, then perhaps you’ve also stumbled across the generally wonderful as3syndicationlib developed by Mike Chambers and Christian Cantrell. For those of you who aren’t in the know, allow me to provide the following excerpt from the project’s google code page:

Use the syndication library to parse Atom and all versions of RSS easily. This library hides the differences between the formats so you can parse any type of feed without having to know what kind of feed it is.

These claims actually hold up pretty well…once you get the code running.

The problem is that the codebase was written specifically for development in Flex. While Flex is a great platform for certain projects, many of us still use Flash for a lot of the work we do, so a toolkit that relies on packages that are only available to Flex just doesn’t do it.

This problem is also no secret. It’s listed as an accepted issue on its project page. The problem is that the codebase apparently hasn’t been updated since December of 2006.  That’s no joke kids.

Fortunately, a solution was pushed forth from outside the project by a Mr. Martin Legris in the form of a bare implementation of the missing “DateBase” class that the syndication library looks for, as well as an edit to an import statement buried down in ParsingTools.as.

So if you, like me, have a need to consume RSS/Atom Feeds in Flash and need a solution that works, look no further. I present, to you, an updated version of the as3 syndication library with the necessary changes in place to begin using it out of the box in your flash projects.

The files are all available here.

Categories: ArticleBugsDownloadsFlashLibrariesas3syndicationlib
Published: 07.02.10 :: No Comments »


Today TechCrunch posted an image of the poster for the upcoming film about facebook entitled “The Social Network.” Now, I’m not posting this because I’m even remotely intrigued by the idea of a film about Mark Zuckerberg, but rather because the poster seemed very familiar to me. Check it out below:

Nice, right? Now check out the cover to the Criterion edition of Nicolas Roeg’s “The Man Who Fell to Earth” (starring David Bowie!).

This is pretty obvious, isn’t it? With the exception of the browser bar overlaid on the right of the poster for “The Social Network,” and the slight difference in typography, these are practically the same composition. For my part, I prefer both the typeface and the quality of the photography in the Bowie cover. I don’t know that I care for the “washed out” look of the Zuckerberg cover. Here’s a side-by-side comparison to assist. Bowie is on the left (I hope that’s obvious) and Zuckerberg is on the right.

I’ve always loved the original cover, and I’m glad to see that other people (clearly) do too.

Published: 06.21.10 :: No Comments »


I don’t doubt that flexicious is, as their site claims, a “MUST HAVE” flex datagrid. What I do doubt is that many people will have a better idea than I do what the hell is going on when I look at their demo.

Ho. Lee. Crap. What we’re looking at is a very complicated DataGrid, the flash world’s version of the spreadsheet. Considering that most people’s entire experience with spreadsheets consists of, at most, viewing Excel documents this presentation is unnecessarily complicated.

Upon first glance, I have no idea what many of these controls are supposed to do. Clearly, this is a powerful spreadsheet. I think. I am kind of afraid to touch anything though. Admittedly, I don’t do as much work with large sets of data as some people certainly do, so perhaps its my limited experience with this volume of information that makes so much of this interface seem foreign and confusing to me.

Without jumping too far in depth as to what I found so confusing about Flexicious, I’ll just present my general reactions to it with a few accompanying screenshots. My reactions proceed as follows:

  1. I don’t like this.
  2. I DEFINITELY don’t like this.
  3. This is pretty clever, but the layout makes me claustrophobic.
  4. This seems wrong to me on many levels.

I understand that it’s hard to invent new visual metaphors for navigating data, especially as the volume of that data grows, but that’s all the more reason one should be extra careful not to go over the deep end and risk alienating users. I’m impressed by the amount of functionality that’s obviously built into flexicious, but at the same time I’m afraid to use it. What good is that?

Categories: ArticleUser Experience
Published: 06.02.10 :: 4 Comments »