Archive for the “flash” Category

There are a lot of problems with the transparent windowing mode (or wmode, as many are familiar with it) in the Flash browser plugin. It's especially bad in Firefox's implementation, as it will no longer dispatch Event.RENDER, which the CS3 component architecture is dependent on. Without a RENDER call, the components don't show up, although they will take text input. The only way you can tell that they're alive is that they FocusRectangle will come up if you click on it.

Now, if you legitimately need the transparency of the windowing mode because you're popping a huge purple gorilla over the normal page, you're pretty much stuck, unless you want to hack the UIComponent class to use an ENTER_FRAME event instead (which did not work for me). However, most people are actually looking to be able to z-index the Flash movie, in which case you can just use the "opaque" attribute value instead of "transparent".

Remember, this is a single param of the object, like <param name="wmode" value="opaque" /> instead of <param name="wmode" value="transparent" />

If you're interested in what's happening behind the scenes, here's the deal: normally whenever a browser lets a plugin lay itself on the screen, it's actually doing a managed window outside of the actual page that you're browsing; in short, it's not part of the actual layout. So, instead of being on the screen, it's in a layer above everything else except for other plugins. When you scroll the page, the browser scrolls the plugin too. Normally, you don't notice this because it's pretty much instantaneous. The only time you notice is when you have a dropdown menu that always falls behind the plugin, for example.

When you put the wmode (window mode for short, remember) parameter on the object/plugin, it's now telling the browser to interlay the plugin with the rest of the elements that are in the page. In fact, it actually is one of the elements of the page, and is now z-indexable.

One minor problem with this approach is that performance is slightly slower, regardless of whether you chose transparent or opaque mode (although transparent is even slower). Most users will not notice, but be aware of it if you're doing timer and sound synced animations.

Comments No Comments »

Here's a nice gotcha I found a while back when trying to run a filter on some XML data. If you write an attribute filter inside of a switch statement, the query will return null when you assign it to the XMLList variable. If you trace out the query instead of assigning it, it works fine.


switch (anything) {
case "testcase":
var xlData:XMLList = xmlData.Books.Book.(@author == 'Dickens');
break;
}

The above code will fail; apparently the scoping inside of switch statements is broken. There's a bug report filed already, but it would be nice to see a fix for this.

Comments 7 Comments »

Flash Player 9's been out since June of 2006, and in less than a year it's jumped to 81-84% penetration, which is great news. I hope that Adobe can continue to release the player versions ahead of time and keep everything up-to-date with the autoupdaters so that when the authoring tools come around, plenty of people are actually using the player at launch date.

Here are the stats.

Comments No Comments »