Posted Friday, August 25, 2006 9:14:55 PM by David Stiller
I mentioned a fact-of-life “gotcha” on my personal dev blog not long ago, pertaining to relative paths in ActionScript. In a nutshell, a SWF’s point of view changes depending on how it’s embedded. A SWF considers relative paths from its own folder when played in a Projector. That makes perfect sense. On the other hand, a SWF embedded in an HTML document, as played by the Flash Player plug-in, sees things differently. To a SWF in an HTML document, relative paths begin from the folder of the HTML document.
For example, if a root HTML document embeds a SWF in a flashcontent subfolder, and if that SWF loads a JPG from the same folder as itself, ActionScript must nonetheless include a reference to the flashcontent subfolder — because that’s where that JPG is located from the HTML’s point of view. This can quickly confuse matters when you test the SWF from inside Flash, because the Flash IDE plays SWFs inside a special Projector (see (Perhaps) Unexpected Point of View: SWF Defers to HTML for some workarounds).
That’s tricky enough as it is, but I just discovered an exception.
An HTML-embedded SWF considers relative paths from the folder of its HTML file unless … unless you’re loading an FLV (Flash video) file. For some reason, FLV references — even in HTML-embedded SWFs — start from the SWF’s own point of view. This is true of the FLVPlayback Component and also a plain vanilla Video object.
Category tags: Flash
Posted Saturday, August 12, 2006 10:48:38 AM by Kim
There have been lots of great postings here and there surrounding the 10th Anniversay of Flash this past week. If you've missed the many announcements and congratulations, here are a few that I thought particularly interesting:
Adobe kicked things off with a nice article from 10 different designers and developers titled Flash: Ten years, ten perspectives, featuring stories from the likes of Justin Everett-Church, Dan Carr, Stacey Mulcahy and our own Rob Reinhart and Tom Green. It's interesting to see how different people became interested in Flash and where the application has taken their careers.
In addition to that article, Adobe also hosted a very interesting Breeze Presentation with Kevin Lynch, Mike Downey, Mike Chambers, and Eric Wittman talking about the early days of Flash and how the product developed from its humble beginnings as a drawing and animation tool into the application we know today. My favorite part of that presentation was the photograph of the shrink-wrapped box that was released as Flash 1 where the only change was the slapping-on of a sticker over the FutureSplash name. That and the little hole where it looks like someone started to remove the cellophane but thought better of it.
Adobe also sponsored a big bash at their offices in San Francisco and Mike Chambers has posted a video of the celebration, including the opening remarks from Kevin Lynch and a funny (of course) Strongbad homage to Flash. This one is a little shaky as you'd expect, having been shot with a run-of-the-mill video camera, but still fun. Here's hoping the original Strongbad movie finds its way on-line somewhere.
So, happy birthday Flash! If you want some perspective on where the application started and where it may be going, as well as the people behind the program, and those who've been infuential in its development, those three resources are a great place to start.
Category tags: Flash