Embedding complex SWF content in WordPress which loads or references other content can be bit tricky. Often the embedded SWF is hosted in different directory than the WordPress page that contains the embed code which means simple relative paths often fail. The reason for this is that SWF files, by default, assume the page in which they are hosted is the “base” location and use that uri to construct all relative paths. This means that relative paths are often out of scope and unresolvable (I ran into this recently with a Flex example that included the “view source” option). The solution is to manually tell the embedded SWF what the desired base path is by setting the “base” attribute in the object / embed tags.
The Flash Player object / embed tags support manually setting the “base” attribute to a different location as described here. However, as I’ve mentioned before I use the killer Kimili plugin for embedding Flash content in WordPress (necessary because WordPress likes to strip out tags it doesn’t understand). Kimili, developed and maintained by Michael Bester, supports all of the object / embed attributes and uses SWFObject under the hood making it a breeze to embed Flash via its special syntax.
Here’s what a working example of setting the base definition in Kimili looks like.
I’ll say it if no one else will–the video tag in HTML 5 looks to be a bad joke. Leave it to a standards body to turn back the clock and give us the same garbage that nearly killed Web video in the first place.
I’ve been slowly learning custom AS3 Flex component development and finally had the desire to add CSS styling into the mix. Here’s a terse, but graphical tutorial on the simplest implementation I could come up with.
Review Flex CSS basics.
Styles cascade just as they do in the browser. There are 3 different ways you can set styles via MXML.
Styles show up in Flex code hinting, but in ActionScript you can’t set the style directly as if it were a property.
Instead you have to use the setStyle( [property name], [property value] ) method.
Creating Custom Styles.
Add a style metadata tag outside the class definition. This tells the compiler the name and attributes of your particular style and lets it do its magic.
Initialize a CSSStyleDeclaration if one doesn’t exist already and set default values on its properties if they haven’t been set.
Override the styleChanged method and determine if the style has been modified. If so, set a dirty flag and tell the display list to redraw itself. (Note: creating “dirty flags” on a per style basis is pretty unwieldy if you have more than a couple of styles. It’s really a tradeoff between readability, tediousness and rendering performance.)
In the updateDisplayList method check the styles dirty flag and draw / update if needed. Make sure to set the dirty flag back to false after updating.
Here’s what the finished masterpiece looks like (sarcasm intended). Context click to view the source of the MXML and ActionScript class file.
Apparently for a cool $300 million you can get a bunch of avid Mac users to attempt to convince themselves that Microsoft is cool enough for them to give up their Apple. Article just emphasizes the perception problem MS has. It’s 6 pages, but the first page and a half and the last couple of pages contain the MS specific bits.
My favorite line from the piece has to be, “If somebody tried to do that to Oracle, you wouldn’t be able to find the body.”
I want a follow up piece that goes back to Crispin offices in 6 months and checks to see if they’re still littered with Macbook AIRs — that’s the real test.